Interface IEnvVarFilePath
Represents a file path on file system, prefixed with an environment variable.
public interface IEnvVarFilePath : IFilePath, IEnvVarPath, IPath
- Inherited Members
- Extension Methods
Methods (5)
GetBrotherDirectoryWithName(string)
Returns a new directory path prefixed with an environment variable, representing a directory with name directoryName, located in the same directory as this file.
IEnvVarDirectoryPath GetBrotherDirectoryWithName(string directoryName)
Parameters
directoryNamestringThe brother directory name.
Returns
GetBrotherFileWithName(string)
Returns a new file path prefixed with an environment variable, refering to a file with name fileName, located in the same directory as this file.
IEnvVarFilePath GetBrotherFileWithName(string fileName)
Parameters
fileNamestringThe brother file name
Returns
TryResolve(out IAbsoluteFilePath)
Returns EnvVarPathResolvingStatus.Success if this file path is prefixed with an environment variable that can be resolved into a drive letter or a UNC absolute file path.
EnvVarPathResolvingStatus TryResolve(out IAbsoluteFilePath pathFileResolved)
Parameters
pathFileResolvedIAbsoluteFilePathIt is the absolute file path resolved returned by this method.
Returns
TryResolve(out IAbsoluteFilePath, out string)
Returns EnvVarPathResolvingStatus.Success if this file path is prefixed with an environment variable that can be resolved into a drive letter or a UNC absolute file path.
bool TryResolve(out IAbsoluteFilePath pathFileResolved, out string failureReason)
Parameters
pathFileResolvedIAbsoluteFilePathIt is the absolute file path resolved returned by this method.
failureReasonstringIf false is returned, failureReason contains the plain english description of the failure.
Returns
UpdateExtension(string)
Returns a new file path prefixed with an environment variable, representing this file with its file name extension updated to newExtension.
IEnvVarFilePath UpdateExtension(string newExtension)
Parameters
newExtensionstringThe new file extension. It must begin with a dot followed by one or many characters.