C# 클래스 NanoByte.Common.Native.UnixUtils

Provides helper methods for Unix-specific features of the Mono library.
This class has a dependency on Mono.Posix. Make sure to check IsUnix before calling any other methods in this class to avoid missing assembly exceptions.
파일 보기 프로젝트 열기: nano-byte/common

Private Properties

프로퍼티 타입 설명
AreHardlinked bool
CreateHardlink void
CreateSymlink void
GetFileSystem string
GetXattr byte[]
Rename void
SetXattr void

공개 메소드들

메소드 설명
IsExecutable ( [ path ) : bool

Checks whether a file is marked as Unix-executable.

Will return false for non-existing files.

IsRegularFile ( [ path ) : bool

Checks whether a file is a regular file (i.e. not a device file, symbolic link, etc.).

Will return false for non-existing files.

IsSymlink ( [ path ) : bool

Checks whether a file is a Unix symbolic link.

Will return false for non-existing files.

IsSymlink ( [ path, string &target ) : bool

Checks whether a file is a Unix symbolic link.

MakeReadOnly ( [ path ) : void

Removes write permissions for everyone on a filesystem object (file or directory).

MakeWritable ( [ path ) : void

Sets write permissions for the owner on a filesystem object (file or directory).

SetExecutable ( [ path, bool executable ) : void

Marks a file as Unix-executable or not Unix-executable.

비공개 메소드들

메소드 설명
AreHardlinked ( [ path1, [ path2 ) : bool
CreateHardlink ( [ sourcePath, [ targetPath ) : void
CreateSymlink ( [ sourcePath, [ targetPath ) : void
GetFileSystem ( [ path ) : string
GetXattr ( [ path, [ name ) : byte[]
Rename ( [ source, [ destination ) : void
SetXattr ( [ path, [ name, [ data ) : void

메소드 상세

IsExecutable() 공개 정적인 메소드

Checks whether a file is marked as Unix-executable.
Will return false for non-existing files.
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static IsExecutable ( [ path ) : bool
path [ The file to check for executable rights.
리턴 bool

IsRegularFile() 공개 정적인 메소드

Checks whether a file is a regular file (i.e. not a device file, symbolic link, etc.).
Will return false for non-existing files.
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static IsRegularFile ( [ path ) : bool
path [
리턴 bool

IsSymlink() 공개 정적인 메소드

Checks whether a file is a Unix symbolic link.
Will return false for non-existing files.
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static IsSymlink ( [ path ) : bool
path [ The path of the file to check.
리턴 bool

IsSymlink() 공개 정적인 메소드

Checks whether a file is a Unix symbolic link.
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static IsSymlink ( [ path, string &target ) : bool
path [ The path of the file to check.
target string Returns the target the symbolic link points to if it exists.
리턴 bool

MakeReadOnly() 공개 정적인 메소드

Removes write permissions for everyone on a filesystem object (file or directory).
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static MakeReadOnly ( [ path ) : void
path [ The filesystem object (file or directory) to make read-only.
리턴 void

MakeWritable() 공개 정적인 메소드

Sets write permissions for the owner on a filesystem object (file or directory).
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static MakeWritable ( [ path ) : void
path [ The filesystem object (file or directory) to make writeable by the owner.
리턴 void

SetExecutable() 공개 정적인 메소드

Marks a file as Unix-executable or not Unix-executable.
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
public static SetExecutable ( [ path, bool executable ) : void
path [ The file to mark as executable or not executable.
executable bool true to mark the file as executable, true to mark it as not executable.
리턴 void