Class FileUtils

wwUtils class which contains a set of common utility classes for Formatting strings Reflection Helpers Object Serialization Stream Manipulation

public static class FileUtils : object

Class Members



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)


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)


Detects the byte order mark of a file and returns an appropriate encoding for the file.

public static Encoding GetFileEncoding(string srcFile)


Returns a fully qualified path from a partial or relative path.

public static string GetFullPath(string path)


Returns a relative path string from a full path based on a base path provided.

public static string GetRelativePath(string fullPath,     string basePath)


Returns the full path of a full physical filename

public static string JustPath(string path)


Opens a stream reader with the appropriate text encoding applied.

public static StreamReader OpenStreamReaderWithEncoding(string srcFile)


Namespace: Westwind.Utilities
Assembly: westwind.utilities.dll

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic