A utility class related to file utilities.
Inheritance Hierarchy Namespace: Altaxo.Main.ServicesAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntaxpublic static class FileUtility
The FileUtility type exposes the following members.
Properties
Methods| | Name | Description |
|---|
  | DeepCopy |
Copies a directory and all its contents recursively.
|
  | GetAbsolutePath |
Combines baseDirectoryPath with relPath and normalizes the resulting path.
|
  | GetCommonBaseDirectory |
Gets the common base directory shared by two directories.
|
  | GetRelativePath |
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.
|
  | IsBaseDirectory |
Determines whether baseDirectory is a base directory of testDirectory.
|
  | IsDirectory |
Determines whether the specified path refers to an existing directory.
|
  | IsEqualFileName(FileName, FileName) |
Determines whether two file names are equal.
|
  | IsEqualFileName(String, String) |
Determines whether two file names refer to the same normalized path.
|
  | IsUrl |
Determines whether the specified path is a URL.
|
  | IsValidDirectoryEntryName |
Checks that a single directory name (not the full path) is valid.
|
  | IsValidPath |
This method checks if a path (full or relative) is valid.
|
  | LazySearchDirectory |
Lazily enumerates files in a directory that match the specified mask.
|
  | MatchesPattern |
Determines whether a file name matches one or more wildcard patterns.
|
  | NormalizePath |
Gets the normalized version of fileName.
Slashes are replaced with backslashes, backreferences "." and ".." are 'evaluated'.
|
  | ObservedLoad(FileOperationDelegate, FileName, FileErrorPolicy) |
Executes a load operation and reports failures using a standard load error message.
|
  | ObservedLoad(NamedFileOperationDelegate, FileName, FileErrorPolicy) |
Executes a load operation that accepts a file name and reports failures using a standard load error message.
|
  | ObservedLoad(FileOperationDelegate, FileName, String, FileErrorPolicy) |
Executes a load operation and reports failures according to the specified policy.
|
  | ObservedLoad(NamedFileOperationDelegate, FileName, String, FileErrorPolicy) |
Executes a load operation that accepts a file name and reports failures according to the specified policy.
|
  | ObservedSave(FileOperationDelegate, FileName, FileErrorPolicy) |
Executes a save operation for a file and reports failures according to the specified policy.
|
  | ObservedSave(NamedFileOrFolderOperationDelegate, PathName, FileErrorPolicy) |
Executes a save-as operation and reports failures using a standard save error message.
|
  | ObservedSave(FileOperationDelegate, PathName, String, FileErrorPolicy) |
Executes a save operation and reports failures according to the specified policy.
|
  | ObservedSave(NamedFileOrFolderOperationDelegate, PathName, String, FileErrorPolicy) |
Executes a save-as operation and reports failures according to the specified policy.
|
  | RaiseFileSaved |
Raises the FileSaved event.
|
  | RenameBaseDirectory |
Replaces the base directory of a path if it starts with a specified source directory.
|
  | TestFileExists |
Tests whether the specified file exists and shows a warning if it does not.
|
Top
Events| | Name | Description |
|---|
  | FileLoaded |
Occurs after a file has been loaded successfully.
|
  | FileSaved |
Occurs after a file has been saved successfully.
|
Top
Fields| | Name | Description |
|---|
  | MaxPathLength |
Gets the maximum path length supported by this utility.
|
Top
See Also