IFileSystem
Description
- Derived from
- Extended by
-
FileSystem abstract
The IFileSystem interface provides additional functionality for accessing directory trees.
Public / Methods
DirectoryCreate
Creates the given directory.
If the given directory already exists, the method returns silently.
The method will create all ancestor directories if necessary.
- IOException
-
If an I/O error has occurred.
DirectoryDelete
Deletes the given directory iff it exists.
A directory can only be deleted if it is empty.
- IOException
-
If an I/O error has occurred.
DirectoryFreeSpace
Returns the estimated amount of storage space that is available in the given directory.
If the given directory does not exist, the storage space for the nearest existing ancestor directory is reported. The returned value is intended to be used for coarse-grained resource decisions.
- IOException
-
If an I/O error has occurred.
DirectoryPop
Pops the top-most directory from the internal stack and sets it as the current directory.
- IOException
-
If an I/O error has occurred.
DirectoryPush
Pushes the current directory onto an internal stack and sets the given directory in as current.
- IOException
-
If an I/O error has occurred.
FileExists
Checks if a binary object exists under the given path.
- IOException
-
If an I/O error has occurred.
FileNew
Creates a new instance of IFile.
The IPathInfo.PathInfo property of the returned IFile will always be in canonical form.
- IOException
-
If an I/O error has occurred.
- See also
ListDirectories
Lists all subdirectories in the given directory.
The returned path names are absolute and fully resolved.
- IOException
-
If an I/O error has occurred.
- See also
ListFiles
Lists all files in the given directory.
The returned path names are absolute and fully resolved.
- IOException
-
If an I/O error has occurred.
- See also
PathValidate
Validates the given path against invalid characters and possible custom constraints that may be imposed by the filesystem implementation.
If Path.IsTrailing returns true
, the given path in will be interpreted as a directory path. Otherwise, it will be interpreted as a file path.
Public / Attributes
Directory
Gets or sets the current directory of this filesystem.
- IOException
-
If an I/O error has occurred.
- See also
InvalidCharacters
Returns the set of characters that must not be present in path elements and root selectors.
MaximumDirectoryPathLength
Returns the maximum total length of a path for a directory.
The path length is defined as Path.Length when Path.IsTrailing returns true
.
MaximumFilePathLength
Returns the maximum total length of a path for a file.
The path length is defined as Path.Length when Path.IsTrailing returns false
.
Extensions
PathValidateThrow
Validates the given path against the invalid characters.
- IOException
-
If at least one path character is invalid.