Click or drag to resize

FileUtility Class

A utility class related to file utilities.
Inheritance Hierarchy
SystemObject
  Altaxo.Main.ServicesFileUtility

Namespace: Altaxo.Main.Services
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static class FileUtility

The FileUtility type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberApplicationRootPath Gets or sets the application root path.
Top
Methods
 NameDescription
Public methodStatic memberDeepCopy Copies a directory and all its contents recursively.
Public methodStatic memberGetAbsolutePath Combines baseDirectoryPath with relPath and normalizes the resulting path.
Public methodStatic memberGetCommonBaseDirectory Gets the common base directory shared by two directories.
Public methodStatic memberGetRelativePath Converts a given absolute path and a given base path to a path that leads from the base path to the absolute path as a relative path.
Public methodStatic memberIsBaseDirectory Determines whether baseDirectory is a base directory of testDirectory.
Public methodStatic memberIsDirectory Determines whether the specified path refers to an existing directory.
Public methodStatic memberIsEqualFileName(FileName, FileName) Determines whether two file names are equal.
Public methodStatic memberIsEqualFileName(String, String) Determines whether two file names refer to the same normalized path.
Public methodStatic memberIsUrl Determines whether the specified path is a URL.
Public methodStatic memberIsValidDirectoryEntryName Checks that a single directory name (not the full path) is valid.
Public methodStatic memberIsValidPath This method checks if a path (full or relative) is valid.
Public methodStatic memberLazySearchDirectory Lazily enumerates files in a directory that match the specified mask.
Public methodStatic memberMatchesPattern Determines whether a file name matches one or more wildcard patterns.
Public methodStatic memberNormalizePath Gets the normalized version of fileName. Slashes are replaced with backslashes, backreferences "." and ".." are 'evaluated'.
Public methodStatic memberObservedLoad(FileOperationDelegate, FileName, FileErrorPolicy) Executes a load operation and reports failures using a standard load error message.
Public methodStatic memberObservedLoad(NamedFileOperationDelegate, FileName, FileErrorPolicy) Executes a load operation that accepts a file name and reports failures using a standard load error message.
Public methodStatic memberObservedLoad(FileOperationDelegate, FileName, String, FileErrorPolicy) Executes a load operation and reports failures according to the specified policy.
Public methodStatic memberObservedLoad(NamedFileOperationDelegate, FileName, String, FileErrorPolicy) Executes a load operation that accepts a file name and reports failures according to the specified policy.
Public methodStatic memberObservedSave(FileOperationDelegate, FileName, FileErrorPolicy) Executes a save operation for a file and reports failures according to the specified policy.
Public methodStatic memberObservedSave(NamedFileOrFolderOperationDelegate, PathName, FileErrorPolicy) Executes a save-as operation and reports failures using a standard save error message.
Public methodStatic memberObservedSave(FileOperationDelegate, PathName, String, FileErrorPolicy) Executes a save operation and reports failures according to the specified policy.
Public methodStatic memberObservedSave(NamedFileOrFolderOperationDelegate, PathName, String, FileErrorPolicy) Executes a save-as operation and reports failures according to the specified policy.
Public methodStatic memberRaiseFileSaved Raises the FileSaved event.
Public methodStatic memberRenameBaseDirectory Replaces the base directory of a path if it starts with a specified source directory.
Public methodStatic memberTestFileExists Tests whether the specified file exists and shows a warning if it does not.
Top
Events
 NameDescription
Public eventStatic memberFileLoaded Occurs after a file has been loaded successfully.
Public eventStatic memberFileSaved Occurs after a file has been saved successfully.
Top
Fields
 NameDescription
Public fieldStatic memberMaxPathLength Gets the maximum path length supported by this utility.
Top
See Also