Property | Type | Description | |
---|---|---|---|
CODEC_FILE_PATTERN | |||
INDEX_EXTENSIONS | string[] | ||
SEGMENTS_GEN | string |
Method | Description | |
---|---|---|
FileNameFromGeneration ( string @base, string ext, long gen ) : string |
Computes the full file name from base, extension and generation. If the generation is -1, the file name is null. If it's 0, the file name is <base>.<ext>. If it's > 0, the file name is <base>_<gen>.<ext>.
|
|
GetExtension ( string filename ) : string |
Return the extension (anything after the first '.'), or null if there is no '.' in the file name.
|
|
MatchesExtension ( string filename, string ext ) : bool |
Returns true if the given filename ends with the given extension. One should provide a pure extension, without '.'.
|
|
ParseSegmentName ( string filename ) : string |
Parses the segment name out of the given file name.
|
|
SegmentFileName ( string segmentName, string segmentSuffix, string ext ) : string |
Returns a file name that includes the given segment name, your own custom name and extension. The format of the filename is: <segmentName>(_<name>)(.<ext>). NOTE: .<ext> is added to the result file name only if NOTE: _<segmentSuffix> is added to the result file name only if it's not the empty string NOTE: all custom files should be named using this method, or otherwise some structures may fail to handle them properly (such as if they are added to compound files).
|
|
StripExtension ( string filename ) : string |
Removes the extension (anything after the first '.'), otherwise returns the original filename.
|
|
StripSegmentName ( string filename ) : string |
Strips the segment name out of the given file name. If you used #segmentFileName or #fileNameFromGeneration to create your files, then this method simply removes whatever comes before the first '.', or the second '_' (excluding both).
|
Method | Description | |
---|---|---|
IndexFileNames ( ) : System.Diagnostics |
No instance
|
|
IndexOfSegmentName ( string filename ) : int |
locates the boundary of the segment name, or -1
|
public static FileNameFromGeneration ( string @base, string ext, long gen ) : string | ||
@base | string | |
ext | string | extension of the filename |
gen | long | generation |
return | string |
public static GetExtension ( string filename ) : string | ||
filename | string | |
return | string |
public static MatchesExtension ( string filename, string ext ) : bool | ||
filename | string | |
ext | string | |
return | bool |
public static ParseSegmentName ( string filename ) : string | ||
filename | string | |
return | string |
public static SegmentFileName ( string segmentName, string segmentSuffix, string ext ) : string | ||
segmentName | string | |
segmentSuffix | string | |
ext | string | |
return | string |
public static StripExtension ( string filename ) : string | ||
filename | string | |
return | string |
public static StripSegmentName ( string filename ) : string | ||
filename | string | |
return | string |
public static Regex,System.Text.RegularExpressions CODEC_FILE_PATTERN | ||
return |