C# 클래스 ICSharpCode.SharpZipLib.Zip.ZipNameTransform

ZipNameTransform transforms names as per the Zip file naming convention.
The use of absolute names is supported although its use is not valid according to Zip naming conventions, and should not be used if maximum compatability is desired.
상속: INameTransform
파일 보기 프로젝트 열기: icsharpcode/SharpZipLib 1 사용 예제들

공개 메소드들

메소드 설명
IsValidName ( string name ) : bool

Test a name to see if it is a valid name for a zip entry.

Zip path names are actually in unix format, and should only contain relative paths if a path is present. This means that the path stored should not contain a drive or device letter, or a leading slash. All slashes should forward slashes '/'. An empty name is valid where the input comes from standard input. A null name is not considered valid.

IsValidName ( string name, bool relaxed ) : bool

Test a name to see if it is a valid name for a zip entry.

Zip path names are actually in Unix format, and should only contain relative paths. This means that any path stored should not contain a drive or device letter, or a leading slash. All slashes should forward slashes '/'. An empty name is valid for a file where the input comes from standard input. A null name is not considered valid.

TransformDirectory ( string name ) : string

Transform a windows directory name according to the Zip file naming conventions.

TransformFile ( string name ) : string

Transform a windows file name according to the Zip file naming conventions.

ZipNameTransform ( string trimPrefix ) : System

Initialize a new instance of

비공개 메소드들

메소드 설명
MakeValidName ( string name, char replacement ) : string

Force a name to be valid by replacing invalid characters with a fixed value

ZipNameTransform ( ) : System

Static constructor.

메소드 상세

IsValidName() 공개 정적인 메소드

Test a name to see if it is a valid name for a zip entry.
Zip path names are actually in unix format, and should only contain relative paths if a path is present. This means that the path stored should not contain a drive or device letter, or a leading slash. All slashes should forward slashes '/'. An empty name is valid where the input comes from standard input. A null name is not considered valid.
public static IsValidName ( string name ) : bool
name string The name to test.
리턴 bool

IsValidName() 공개 정적인 메소드

Test a name to see if it is a valid name for a zip entry.
Zip path names are actually in Unix format, and should only contain relative paths. This means that any path stored should not contain a drive or device letter, or a leading slash. All slashes should forward slashes '/'. An empty name is valid for a file where the input comes from standard input. A null name is not considered valid.
public static IsValidName ( string name, bool relaxed ) : bool
name string The name to test.
relaxed bool If true checking is relaxed about windows file names and absolute paths.
리턴 bool

TransformDirectory() 공개 메소드

Transform a windows directory name according to the Zip file naming conventions.
public TransformDirectory ( string name ) : string
name string The directory name to transform.
리턴 string

TransformFile() 공개 메소드

Transform a windows file name according to the Zip file naming conventions.
public TransformFile ( string name ) : string
name string The file name to transform.
리턴 string

ZipNameTransform() 공개 메소드

Initialize a new instance of
public ZipNameTransform ( string trimPrefix ) : System
trimPrefix string The string to trim from the front of paths if found.
리턴 System