Метод | Описание | |
---|---|---|
CopyStream ( Stream source, Stream dest, int bufferSize ) : void |
Copies the content of the one stream to another. Streams must be open and stay open.
|
|
CopyStream ( Stream source, Stream dest, int bufferSize, bool append ) : void |
Copies the content of one stream to another by appending to the target stream Streams must be open when passed in.
|
|
DeleteTimedoutFiles ( string filespec, int seconds ) : void |
Deletes files based on a file spec and a given timeout. This routine is useful for cleaning up temp files in Web applications.
|
|
GetFileEncoding ( string srcFile ) : |
Detects the byte order mark of a file and returns an appropriate encoding for the file.
|
|
GetFullPath ( string path ) : string |
Returns a fully qualified path from a partial or relative path.
|
|
GetPhysicalPath ( string filename ) : string |
This function returns the actual filename of a file that exists on disk. If you provide a path/file name that is not proper cased as input, this function fixes it up and returns the file using the path and file names as they exist on disk. If the file doesn't exist the original filename is returned.
|
|
GetRelativePath ( string fullPath, string basePath ) : string |
Returns a relative path string from a full path based on a base path provided.
|
|
JustPath ( string path ) : string |
Returns the full path of a full physical filename
|
|
OpenStreamReaderWithEncoding ( string srcFile ) : |
Opens a stream reader with the appropriate text encoding applied.
|
|
SafeFilename ( string fileName, string replace = "" ) : string |
Creates a safe file and directory name that is stripped of all invalid characters.
|
Метод | Описание | |
---|---|---|
GetLongPathName ( string ShortPath, StringBuilder sb, int buffer ) : uint |
public static CopyStream ( Stream source, Stream dest, int bufferSize ) : void | ||
source | Stream | |
dest | Stream | |
bufferSize | int | |
Результат | void |
public static CopyStream ( Stream source, Stream dest, int bufferSize, bool append ) : void | ||
source | Stream | |
dest | Stream | |
bufferSize | int | |
append | bool | |
Результат | void |
public static DeleteTimedoutFiles ( string filespec, int seconds ) : void | ||
filespec | string | A filespec that includes path and/or wildcards to select files |
seconds | int | The timeout - if files are older than this timeout they are deleted |
Результат | void |
public static GetFileEncoding ( string srcFile ) : |
||
srcFile | string | |
Результат |
public static GetFullPath ( string path ) : string | ||
path | string | |
Результат | string |
public static GetPhysicalPath ( string filename ) : string | ||
filename | string | A filename to check |
Результат | string |
public static GetRelativePath ( string fullPath, string basePath ) : string | ||
fullPath | string | The path to convert. Can be either a file or a directory |
basePath | string | The base path on which relative processing is based. Should be a directory. |
Результат | string |
public static JustPath ( string path ) : string | ||
path | string | |
Результат | string |
public static OpenStreamReaderWithEncoding ( string srcFile ) : |
||
srcFile | string | |
Результат |
public static SafeFilename ( string fileName, string replace = "" ) : string | ||
fileName | string | Filename to clean up |
replace | string | Replacement character for invalid characters |
Результат | string |