Class FileUtils

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

System.Object
  Westwind.Utilities.FileUtils
public static class FileUtils : object

Class Members

MemberDescription

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)

Requirements

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

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