C# 클래스 fCraft.Paths

Contains fCraft path settings, and some filesystem-related utilities.
파일 보기 프로젝트 열기: GlennMR/800craft 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
WorkingPathDefault string

공개 메소드들

메소드 설명
Compare ( [ p1, [ p2 ) : bool

Returns true if paths or filenames reference the same location (accounts for all the filesystem quirks).

Compare ( [ p1, [ p2, bool caseSensitive ) : bool

Returns true if paths or filenames reference the same location (accounts for all the filesystem quirks).

Contains ( [ parentPath, [ childPath ) : bool

Checks whether childPath is inside parentPath

Contains ( [ parentPath, [ childPath, bool caseSensitive ) : bool

Checks whether childPath is inside parentPath

Exists ( [ fileInfo, bool caseSensitive ) : bool

Checks whether the file exists in a specified way (case-sensitive or case-insensitive)

FileExists ( [ fileName, bool caseSensitive ) : bool

Checks whether the file exists in a specified way (case-sensitive or case-insensitive)

FindFiles ( [ fullFileName ) : System.IO.FileInfo[]

Find files that match the name in a case-insensitive way.

ForceRename ( [ originalFullFileName, [ newFileName ) : void

Allows making changes to filename capitalization on case-insensitive filesystems.

IsDefaultMapPath ( [ path ) : bool
IsProtectedFileName ( [ fileName ) : bool
IsValidPath ( string path ) : bool
MoveOrReplace ( [ source, [ destination ) : void
TestDirectory ( [ pathLabel, [ path, bool checkForWriteAccess ) : bool

Makes sure that the path format is valid, that it exists, that it is accessible and writeable.

TestFile ( [ fileLabel, [ filename, bool createIfDoesNotExist, FileAccess neededAccess ) : bool

Makes sure that the path format is valid, and optionally whether it is readable/writeable.

비공개 메소드들

메소드 설명
Paths ( ) : System

메소드 상세

Compare() 공개 정적인 메소드

Returns true if paths or filenames reference the same location (accounts for all the filesystem quirks).
public static Compare ( [ p1, [ p2 ) : bool
p1 [
p2 [
리턴 bool

Compare() 공개 정적인 메소드

Returns true if paths or filenames reference the same location (accounts for all the filesystem quirks).
public static Compare ( [ p1, [ p2, bool caseSensitive ) : bool
p1 [
p2 [
caseSensitive bool
리턴 bool

Contains() 공개 정적인 메소드

Checks whether childPath is inside parentPath
public static Contains ( [ parentPath, [ childPath ) : bool
parentPath [ Path that is supposed to contain childPath
childPath [ Path that is supposed to be contained within parentPath
리턴 bool

Contains() 공개 정적인 메소드

Checks whether childPath is inside parentPath
public static Contains ( [ parentPath, [ childPath, bool caseSensitive ) : bool
parentPath [ Path that is supposed to contain childPath
childPath [ Path that is supposed to be contained within parentPath
caseSensitive bool Whether check should be case-sensitive or case-insensitive.
리턴 bool

Exists() 공개 정적인 메소드

Checks whether the file exists in a specified way (case-sensitive or case-insensitive)
public static Exists ( [ fileInfo, bool caseSensitive ) : bool
fileInfo [ FileInfo object in question
caseSensitive bool Whether check should be case-sensitive or case-insensitive.
리턴 bool

FileExists() 공개 정적인 메소드

Checks whether the file exists in a specified way (case-sensitive or case-insensitive)
public static FileExists ( [ fileName, bool caseSensitive ) : bool
fileName [ filename in question
caseSensitive bool Whether check should be case-sensitive or case-insensitive.
리턴 bool

FindFiles() 공개 정적인 메소드

Find files that match the name in a case-insensitive way.
public static FindFiles ( [ fullFileName ) : System.IO.FileInfo[]
fullFileName [ Case-insensitive filename to look for.
리턴 System.IO.FileInfo[]

ForceRename() 공개 정적인 메소드

Allows making changes to filename capitalization on case-insensitive filesystems.
public static ForceRename ( [ originalFullFileName, [ newFileName ) : void
originalFullFileName [ Full path to the original filename
newFileName [ New file name (do not include the full path)
리턴 void

IsDefaultMapPath() 공개 정적인 메소드

public static IsDefaultMapPath ( [ path ) : bool
path [
리턴 bool

IsProtectedFileName() 공개 정적인 메소드

public static IsProtectedFileName ( [ fileName ) : bool
fileName [
리턴 bool

IsValidPath() 공개 정적인 메소드

public static IsValidPath ( string path ) : bool
path string
리턴 bool

MoveOrReplace() 공개 정적인 메소드

public static MoveOrReplace ( [ source, [ destination ) : void
source [
destination [
리턴 void

TestDirectory() 공개 정적인 메소드

Makes sure that the path format is valid, that it exists, that it is accessible and writeable.
public static TestDirectory ( [ pathLabel, [ path, bool checkForWriteAccess ) : bool
pathLabel [ Name of the path that's being tested (e.g. "map path"). Used for logging.
path [ Full or partial path.
checkForWriteAccess bool If set, tries to write to the given directory.
리턴 bool

TestFile() 공개 정적인 메소드

Makes sure that the path format is valid, and optionally whether it is readable/writeable.
public static TestFile ( [ fileLabel, [ filename, bool createIfDoesNotExist, FileAccess neededAccess ) : bool
fileLabel [ Name of the path that's being tested (e.g. "map path"). Used for logging.
filename [ Full or partial path of the file.
createIfDoesNotExist bool If target file is missing and this option is OFF, TestFile returns true. /// If target file is missing and this option is ON, TestFile tries to create /// a file and returns whether it succeeded.
neededAccess FileAccess If file is present, type of access to test.
리턴 bool

프로퍼티 상세

WorkingPathDefault 공개적으로 정적으로 프로퍼티

public static string WorkingPathDefault
리턴 string