語言

File.SetUnixFileMode 方法

定義

多載

名稱 Description
SetUnixFileMode(SafeFileHandle, UnixFileMode)

設定指定檔案 handle 的指定 UnixFileMode 值。

SetUnixFileMode(String, UnixFileMode)

將檔案的指定 UnixFileMode 路徑設定為指定路徑。

SetUnixFileMode(SafeFileHandle, UnixFileMode)

來源:
File.cs
來源:
File.cs
來源:
File.cs
來源:
File.cs
來源:
File.cs

設定指定檔案 handle 的指定 UnixFileMode 值。

public:
 static void SetUnixFileMode(Microsoft::Win32::SafeHandles::SafeFileHandle ^ fileHandle, System::IO::UnixFileMode mode);
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public static void SetUnixFileMode(Microsoft.Win32.SafeHandles.SafeFileHandle fileHandle, System.IO.UnixFileMode mode);
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
static member SetUnixFileMode : Microsoft.Win32.SafeHandles.SafeFileHandle * System.IO.UnixFileMode -> unit
Public Shared Sub SetUnixFileMode (fileHandle As SafeFileHandle, mode As UnixFileMode)

參數

fileHandle
SafeFileHandle

檔句柄。

mode
UnixFileMode

Unix 檔案模式。

屬性

例外狀況

檔案模式無效。

來電者沒有所需的權限。

檔案已結案。

適用於

SetUnixFileMode(String, UnixFileMode)

來源:
File.cs
來源:
File.cs
來源:
File.cs
來源:
File.cs
來源:
File.cs

將檔案的指定 UnixFileMode 路徑設定為指定路徑。

public:
 static void SetUnixFileMode(System::String ^ path, System::IO::UnixFileMode mode);
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public static void SetUnixFileMode(string path, System.IO.UnixFileMode mode);
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
static member SetUnixFileMode : string * System.IO.UnixFileMode -> unit
Public Shared Sub SetUnixFileMode (path As String, mode As UnixFileMode)

參數

path
String

通往檔案的路徑。

mode
UnixFileMode

Unix 檔案模式。

屬性

例外狀況

path 是零長度字串,或包含一個或多個無效字元。 你可以用這個 GetInvalidPathChars() 方法查詢無效字元。

path 是 null。

檔案模式無效。

來電者沒有所需的權限。

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

其中 path 的元件不是目錄。

找不到該檔案。

適用於