java 怎么判断文件夹的读写权限。请高手帮忙啊!

解决方案 »

  1.   

    File f = new File("121212.txt");
    f.canRead(); 
    f.canWrite();
    f.canExecute(); boolean canExecute() 
              测试应用程序是否可以执行此抽象路径名表示的文件。 
     boolean canRead() 
              测试应用程序是否可以读取此抽象路径名表示的文件。 
     boolean canWrite() 
              测试应用程序是否可以修改此抽象路径名表示的文件。