2013-08-07 59 views
3

我只是想知道是否有屬性的列表名稱中使用以下時,被稱爲:我在哪裏可以找到屬性名稱列表?

但是,您可以使用setAttribute(路徑, 字符串,對象,LinkOption設置DOS屬性.. )方法如下:

Path file = ...; Files.setAttribute(文件,「dos:hidden」,true);

在這種情況下,.isHidden()方法被稱爲hidden,那isReadOnly()?我試過dos:readOnly和其他組合,但沒有達到想要的結果。 你知道任何鏈接有哪些屬性「參考」的列表? 在此先感謝。

回答

3

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); 
+0

什麼是 「DOS:系統」? – Rollerball

+1

忘了它:「此屬性通常用於指示該文件是操作系統的一個組件。」 – Rollerball

+0

我剛要回答,這就是我要說的話。老實說,我真的不知道什麼時候有人會需要這個命令。 – Tricky12

相關問題