Skip to content

Instantly share code, notes, and snippets.

@bobbyjam99-zz
Created October 30, 2014 12:19
Show Gist options
  • Save bobbyjam99-zz/237699d877e7221bcf5c to your computer and use it in GitHub Desktop.
Save bobbyjam99-zz/237699d877e7221bcf5c to your computer and use it in GitHub Desktop.
Windows7 で File#mkdir を使って作成したフォルダに対して setWritable を実行したら false になっちゃうYO
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