Redigera

Dela via


FileSystemInfo.UnixFileMode Property

Definition

Gets or sets the Unix file mode for the current file or directory.

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

Property Value

UnixFileMode of the current FileSystemInfo.

Attributes

Exceptions

The file mode is invalid.

The caller does not have the required permission.

The specified path exceeds the system-defined maximum length.

The specified path is invalid. Only thrown when setting the property value.

The specified file doesn't exist. Only thrown when setting the property value.

Refresh() cannot initialize the data.

Remarks

The value may be cached when either the value itself or other FileSystemInfo properties are accessed. To get the latest value, call the Refresh() method.

If the path doesn't exist as of the last cached state, the return value is (UnixFileMode)(-1). FileNotFoundException or DirectoryNotFoundException can only be thrown when setting the value.

Applies to