filesystems - Manipulating file read permissions in Java -


i'm trying remove read permission file using java

file f = new file("test.txt"); if(!f.exists())     f.createnewfile(); system.out.println(f.setreadable(false)); 

the code above return false. expected opposite since file try manipulate newly created. need work on both os windows , linux.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -