Created
October 30, 2014 12:19
-
-
Save bobbyjam99-zz/237699d877e7221bcf5c to your computer and use it in GitHub Desktop.
Windows7 で File#mkdir を使って作成したフォルダに対して setWritable を実行したら false になっちゃうYO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
public class App | |
{ | |
public static void main( String[] args ) | |
{ | |
File file = new File("c:\\tmp\\data"); | |
file.mkdir(); | |
System.out.println(file.setExecutable(true, false)); // true | |
System.out.println(file.setReadable(true, false)); // true | |
System.out.println(file.setWritable(true, false)); // false?? | |
System.out.println(file.canWrite()); // true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment