Interface IEnvVarDirectoryPath
Represents a directory path on file system, prefixed with an environment variable.
public interface IEnvVarDirectoryPath : IDirectoryPath, IEnvVarPath, IPath
- Inherited Members
- Extension Methods
Methods (10)
GetBrotherDirectoryWithName(string)
Returns a new directory path prefixed with an environment variable, representing a directory with name directoryName, located in the parent's directory of this directory.
IEnvVarDirectoryPath GetBrotherDirectoryWithName(string directoryName)
Parameters
directoryNamestringThe brother directory name.
Returns
Exceptions
- InvalidOperationException
This relative directory path doesn't have a parent directory.
GetBrotherFileWithName(string)
Returns a new file path prefixed with an environment variable, representing a file with name fileName, located in the parent's directory of this directory.
IEnvVarFilePath GetBrotherFileWithName(string fileName)
Parameters
fileNamestringThe brother file name.
Returns
Exceptions
- InvalidOperationException
This relative directory path doesn't have a parent directory.
GetChildDirectoryWithName(string)
Returns a new directory path prefixed with an environment variable, representing a directory with name directoryName, located in this directory.
IEnvVarDirectoryPath GetChildDirectoryWithName(string directoryName)
Parameters
directoryNamestringThe child directory name.
Returns
GetChildFileWithName(string)
Returns a new file path prefixed with an environment variable, representing a file with name fileName, located in this directory.
IEnvVarFilePath GetChildFileWithName(string fileName)
Parameters
fileNamestringThe child file name.
Returns
TryGetBrotherDirectoryWithName(string, out IEnvVarDirectoryPath, out string)
Returns true if directoryName doesn't contain forbidden character in path.
bool TryGetBrotherDirectoryWithName(string directoryName, out IEnvVarDirectoryPath directoryPath, out string failureReason)
Parameters
directoryNamestringThe brother directory name.
directoryPathIEnvVarDirectoryPathThe directory path obtained.
failureReasonstringThe explanation in case this call returns false.
Returns
TryGetBrotherFileWithName(string, out IEnvVarFilePath, out string)
Returns true if fileName doesn't contain forbidden character in path.
bool TryGetBrotherFileWithName(string fileName, out IEnvVarFilePath filePath, out string failureReason)
Parameters
fileNamestringThe brother file name.
filePathIEnvVarFilePathThe file path obtained.
failureReasonstringThe explanation in case this call returns false.
Returns
TryGetChildDirectoryWithName(string, out IEnvVarDirectoryPath, out string)
Returns true if directoryName doesn't contain forbidden character in path.
bool TryGetChildDirectoryWithName(string directoryName, out IEnvVarDirectoryPath directoryPath, out string failureReason)
Parameters
directoryNamestringThe child directory name.
directoryPathIEnvVarDirectoryPathThe directory path obtained.
failureReasonstringThe explanation in case this call returns false.
Returns
TryGetChildFileWithName(string, out IEnvVarFilePath, out string)
Returns true if fileName doesn't contain forbidden character in path.
bool TryGetChildFileWithName(string fileName, out IEnvVarFilePath filePath, out string failureReason)
Parameters
fileNamestringThe child file name.
filePathIEnvVarFilePathThe file path obtained.
failureReasonstringThe explanation in case this call returns false.
Returns
TryResolve(out IAbsoluteDirectoryPath)
Returns EnvVarPathResolvingStatus.Success if this directory path is prefixed with an environment variable that can be resolved into a drive letter or a UNC absolute directory path.
EnvVarPathResolvingStatus TryResolve(out IAbsoluteDirectoryPath pathDirectoryResolved)
Parameters
pathDirectoryResolvedIAbsoluteDirectoryPathIt is the absolute directory path resolved returned by this method.
Returns
TryResolve(out IAbsoluteDirectoryPath, out string)
Returns EnvVarPathResolvingStatus.Success if this directory path is prefixed with an environment variable that can be resolved into a drive letter or a UNC absolute directory path.
bool TryResolve(out IAbsoluteDirectoryPath pathDirectoryResolved, out string failureReason)
Parameters
pathDirectoryResolvedIAbsoluteDirectoryPathIt is the absolute directory path resolved returned by this method.
failureReasonstringIf false is returned, failureReason contains the plain english description of the failure.