File.SetUnixFileMode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetUnixFileMode(SafeFileHandle, UnixFileMode) |
Sets the specified UnixFileMode of the specified file handle. |
SetUnixFileMode(String, UnixFileMode) |
Sets the specified UnixFileMode of the file on the specified path. |
SetUnixFileMode(SafeFileHandle, UnixFileMode)
- Source:
- File.cs
- Source:
- File.cs
- Source:
- File.cs
Sets the specified UnixFileMode of the specified file handle.
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)
Parameters
- fileHandle
- SafeFileHandle
The file handle.
- mode
- UnixFileMode
The Unix file mode.
- Attributes
Exceptions
The file mode is invalid.
The caller does not have the required permission.
The file is closed.
Applies to
SetUnixFileMode(String, UnixFileMode)
- Source:
- File.cs
- Source:
- File.cs
- Source:
- File.cs
Sets the specified UnixFileMode of the file on the specified path.
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)
Parameters
- path
- String
The path to the file.
- mode
- UnixFileMode
The Unix file mode.
- Attributes
Exceptions
path
is a zero-length string, or contains one or more invalid characters. You can query for invalid characters by using the GetInvalidPathChars() method.
path
is null
.
The file mode is invalid.
The caller does not have the required permission.
The specified path exceeds the system-defined maximum length.
A component of the path
is not a directory.
The file cannot be found.