public static class FileUtils : object
Member | Description | |
---|---|---|
CopyStream | Copies the content of the one stream to another. Streams must be open and stay open. public static void CopyStream(Stream source,
Stream dest, int bufferSize); public static void CopyStream(Stream source,
Stream dest, int bufferSize, bool append); |
|
DeleteTimedoutFiles | Deletes files based on a file spec and a given timeout. This routine is useful for cleaning up temp files in Web applications. public static void DeleteTimedoutFiles(string filespec,
int seconds); |
|
GetFileEncoding | Detects the byte order mark of a file and returns an appropriate encoding for the file. public static Encoding GetFileEncoding(string srcFile);
|
|
GetFullPath | Returns a fully qualified path from a partial or relative path. public static string GetFullPath(string path);
|
|
GetRelativePath | Returns a relative path string from a full path based on a base path provided. public static string GetRelativePath(string fullPath,
string basePath); |
|
JustPath | Returns the full path of a full physical filename public static string JustPath(string path);
|
|
OpenStreamReaderWithEncoding | Opens a stream reader with the appropriate text encoding applied. public static StreamReader OpenStreamReaderWithEncoding(string srcFile);
|