Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find the list of attributes name?

I am just wondering if there is a list of attributes name to be referred when using the following:

However, you can set a DOS attribute using the setAttribute(Path, String, Object, LinkOption...) method, as follows:

Path file = ...; Files.setAttribute(file, "dos:hidden", true);

In this case the .isHidden() method is referred as hidden, what about isReadOnly()? I have tried dos:readOnly and other combination, however without achieving the result wanted. Dou you know any link which has a list of those attribute "reference"? Thanks in advance.

like image 328
Rollerball Avatar asked Nov 16 '25 02:11

Rollerball


1 Answers

http://www.kodejava.org/how-do-i-set-the-value-of-file-attributes/

//
// Set a new file attributes.
//
Files.setAttribute(file, "dos:archive", false);
Files.setAttribute(file, "dos:hidden", false);
Files.setAttribute(file, "dos:readonly", false);
Files.setAttribute(file, "dos:system", false);
like image 90
Tricky12 Avatar answered Nov 17 '25 19:11

Tricky12



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!