1

It's easy in python, os.chmod("F:\\123", stat.S_IREAD)

But what is the equivalent code in Java?

file.setReadOnly(); and file.setWritable(false);does not work.

J.F.
  • 13,927
  • 9
  • 27
  • 65
Yuhao Tang
  • 11
  • 2
  • 2
    Looking at this post, it should work: https://stackoverflow.com/a/32947505/679240 What are you trying, and what results are you getting? – Haroldo_OK Jan 20 '21 at 10:48
  • @Haroldo_OK I want to use desktop.ini to create customized icon for folder. It seems on Windows, a folder need to have read-only property itself to display the customized icon. – Yuhao Tang Jan 20 '21 at 14:04

0 Answers0