C# Class fs4net.Framework.FileSystemExtensions

Show file Open project: toroso/fs4net

Public Methods

Method Description
DirectoryDescribing ( IFileSystem fileSystem, string fullPath ) : RootedDirectory

Creates a descriptor to a directory from the given path. This method throws if the path is invalid. The path may not end with a backslash. This method will succeed even if the directory does not exist.

DirectoryDescribingSpecialFolder ( this fileSystem, Environment folder ) : RootedDirectory

Creates a descriptor to the special folder identified by the parameter.

DirectoryFromCurrentDirectory ( this fileSystem, string path ) : RootedDirectory

Creates a descriptor to a directory from the given path. If the given path is relative, the current directory is used to make the descriptor rooted.

DriveDescribing ( IFileSystem fileSystem, string driveName ) : Drive

Creates a descriptor to a drive from the given drive name. The drive should be given without an ending backslash. Examples: "c:", "\\network\share". This method will succeed even if the drive does not exist.

FileDescribing ( IFileSystem fileSystem, string fullPath ) : RootedFile

Creates a file descriptor from the given path. This method throws if the path is invalid. This method will succeed even if the file does not exist.

FileFromCurrentDirectory ( IFileSystem fileSystem, string path ) : RootedFile

Creates a file descriptor from the given path. If the given path is relative, the current directory is used to make the descriptor rooted.

Method Details

DirectoryDescribing() public static method

Creates a descriptor to a directory from the given path. This method throws if the path is invalid. The path may not end with a backslash. This method will succeed even if the directory does not exist.
The specified path, in its canonical form, exceeds /// the system-defined maximum length. The specified path contains invalid characters, /// contains an invalid drive letter, or is invalid in some other way. The specified path is null. The specified path is relative or empty.
public static DirectoryDescribing ( IFileSystem fileSystem, string fullPath ) : RootedDirectory
fileSystem IFileSystem
fullPath string
return RootedDirectory

DirectoryDescribingSpecialFolder() public static method

Creates a descriptor to the special folder identified by the parameter.
The specified file system or the specified path is null. The path associated with the specified special folder /// contains invalid characters, contains an invalid drive letter, or is invalid in some other way.
public static DirectoryDescribingSpecialFolder ( this fileSystem, Environment folder ) : RootedDirectory
fileSystem this
folder System.Environment
return RootedDirectory

DirectoryFromCurrentDirectory() public static method

Creates a descriptor to a directory from the given path. If the given path is relative, the current directory is used to make the descriptor rooted.
The specified file system or the specified path is null. The specified path, in its canonical form, exceeds /// the system-defined maximum length. The specified path contains invalid characters, /// contains an invalid drive letter, or is invalid in some other way.
public static DirectoryFromCurrentDirectory ( this fileSystem, string path ) : RootedDirectory
fileSystem this
path string
return RootedDirectory

DriveDescribing() public static method

Creates a descriptor to a drive from the given drive name. The drive should be given without an ending backslash. Examples: "c:", "\\network\share". This method will succeed even if the drive does not exist.
The specified path is null. The specified path is empty or contains an invalid drive letter.
public static DriveDescribing ( IFileSystem fileSystem, string driveName ) : Drive
fileSystem IFileSystem
driveName string
return Drive

FileDescribing() public static method

Creates a file descriptor from the given path. This method throws if the path is invalid. This method will succeed even if the file does not exist.
The specified path, in its canonical form, exceeds /// the system-defined maximum length. The specified path contains invalid characters, /// contains an invalid drive letter, or is invalid in some other way. The specified path is null. The specified path is relative or empty.
public static FileDescribing ( IFileSystem fileSystem, string fullPath ) : RootedFile
fileSystem IFileSystem
fullPath string
return RootedFile

FileFromCurrentDirectory() public static method

Creates a file descriptor from the given path. If the given path is relative, the current directory is used to make the descriptor rooted.
The specified file system or the specified path is null. The specified path, in its canonical form, exceeds /// the system-defined maximum length. The specified path contains invalid characters, /// contains an invalid drive letter, or is invalid in some other way.
public static FileFromCurrentDirectory ( IFileSystem fileSystem, string path ) : RootedFile
fileSystem IFileSystem
path string
return RootedFile