boolean isDirectory()
          Tests whether the file denoted by this abstract pathname is a directory.
 boolean isFile()
 String[] list()
          Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.
 String[] list(FilenameFilter filter)
          Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
 File[] listFiles()
          Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
 File[] listFiles(FileFilter filter)
          Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
 File[] listFiles(FilenameFilter filter)
          Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.

解决方案 »

  1.   

    is开头的方法还有几个
    你去看看isDirectory()
    是否文件夹
    isFile()
    是否文件
    list()
    这个是常用的列出所有文件和文件夹的方法
      

  2.   

    这些函数都是在
    java.io.File里面的
      

  3.   

    不好意思阿,实用的代码我就没有了~~~删除一个目录没有直接的方法  ,
    File里面的delete()方法只能删除空文件夹所以你只能递归的删除一个子目录下的所有文件和目录
    然后再删除当前的目录,是比较麻烦一点的
      

  4.   

    生成一个目录呢?生成一个目录的办法是
    boolean mkdir()
              Creates the directory named by this abstract pathname.
     boolean mkdirs()
              Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories.
    这两个方法····呵呵,怎么我好像是在复制API了~~