FileSystemInfo.UnixFileMode 屬性

定義

取得或設定目前檔案或目錄的 Unix 檔案模式。

public:
 property System::IO::UnixFileMode UnixFileMode { System::IO::UnixFileMode get(); void set(System::IO::UnixFileMode value); };
public System.IO.UnixFileMode UnixFileMode { get; [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] set; }
[<set: System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
member this.UnixFileMode : System.IO.UnixFileMode with get, set
Public Property UnixFileMode As UnixFileMode

屬性值

目前 UnixFileModeFileSystemInfo

屬性

例外狀況

檔案模式無效。

呼叫端沒有必要的權限。

指定的路徑超過系統定義的最大長度。

指定的路徑無效。 只在設定屬性 (property) 值時擲回。

指定的檔案不存在。 只在設定屬性值時擲回。

Refresh() 無法初始化資料。

備註

當存取值本身或其他 FileSystemInfo 屬性時,可能會快取值。 若要取得最新的值,請呼叫 Refresh() 方法。

如果路徑不存在於最後一個快取狀態時,傳回值為 (UnixFileMode)(-1)FileNotFoundExceptionDirectoryNotFoundException 只能在設定值時擲回。

適用於