不是很清楚,是不是安全问题呢?不过按理说不应该的,因为JAVA不在乎硬盘的存储方式的。

解决方案 »

  1.   

    应该不会吧?我做的拷贝目录的函数,NTFS格式的目录也可以考得.
      

  2.   

    我的怎么会呢,看看我的代源,请你们看看有什么问题
    public  void search(String path) 
    {
    file=new File(path);

    String[] strlist;


    strlist=file.list();
    for(int i=0;i<strlist.length;i++)
    {

    childpath=path+"\\"+strlist[i];
    childfile=new File(childpath);
    if(childfile.isDirectory())
    {
    search(childpath);

    }

    else 
    // else{filename=childfile.getAbsolutePath();
    {
    filename=childfile.getAbsolutePath();

    //System.out.println(childfile.getAbsolutePath()+filename);
    try{if(filename.endsWith(".mp3"))
    {num++;
    toClient.println(num+"  "+filename+"<br>");
    toClient.flush(); }


    //f.write((Integer.valueOf("\n")).intValue());
    }catch(Exception e){}
    }
    }
    }
    }
      

  3.   

    for(int i=0;i<strlist.length;i++)
    {
    System.out.println(strlist[i]);//加上看看什么问题
    childpath=path+"\\"+strlist[i];
    childfile=new File(childpath);
    if(childfile.isDirectory())
    {
    search(childpath);

    }

    else 
    // else{filename=childfile.getAbsolutePath();
    {
    filename=childfile.getAbsolutePath();

    //System.out.println(childfile.getAbsolutePath()+filename);
      

  4.   

    明白了,原来是磁盘里有个System Volume Information的文件夹不能访问才出现的这个问题,不知道为什么这个文件夹不能访问,有人知道吗?
      

  5.   

    这个是windows的系统文件,描述磁盘本身信息
      

  6.   

    呵呵,我告诉你怎么做,你检查一下是不是hidden,也就是说你在if(childfile.isDirectory()&&childfile.isHidden())这样就可以了,而且你要知道别人也不希望你的软件可以搜寻hidden的东西!
      

  7.   

    java中的很多问题都没有得到很好的解决,比如以上问题。
    希望新版java能够妥善解决好许多兼容性的问题。
    毕竟很多人都是基于Windows开发的。
      

  8.   

    System Volume Information 是系统文件夹,好像是 NTFS 权限管理 起了限制左右 ,你不能读取文件,好像只能列举文件 (用 Administrator 账户都这样。). 它属于 System 账户。