Table of Contents

Interface IVariableFilePath

Namespace
NDepend.Path
Assembly
NDepend.API.dll

Represents a file path on file system, prefixed with an environment variable.

public interface IVariableFilePath : IFilePath, IVariablePath, IPath
Inherited Members
Extension Methods

Methods (6)

GetBrotherDirectoryWithName(string)

Returns a new directory path containing variables, representing a directory with name directoryName, located in the same directory as this file.

IVariableDirectoryPath GetBrotherDirectoryWithName(string directoryName)

Parameters

directoryName string

The brother directory name.

Returns

IVariableDirectoryPath

GetBrotherFileWithName(string)

Returns a new file path containing variables, refering to a file with name fileName, located in the same directory as this file.

IVariableFilePath GetBrotherFileWithName(string fileName)

Parameters

fileName string

The brother file name

Returns

IVariableFilePath

TryResolve(IEnumerable<KeyValuePair<string, string>>, out IAbsoluteFilePath)

Returns VariablePathResolvingStatus.Success if AllVariables of this path can be resolved from variablesValues and the path can be resolved into a drive letter or a UNC absolute file path.

VariablePathResolvingStatus TryResolve(IEnumerable<KeyValuePair<string, string>> variablesValues, out IAbsoluteFilePath pathFileResolved)

Parameters

variablesValues IEnumerable<KeyValuePair<string, string>>

It is the sequence of pairs [variable name/variable value] used to resolve the path.

pathFileResolved IAbsoluteFilePath

It is the absolute file path resolved obtained if this method returns VariablePathResolvingStatus.Success.

Returns

VariablePathResolvingStatus

TryResolve(IEnumerable<KeyValuePair<string, string>>, out IAbsoluteFilePath, out IReadOnlyList<string>)

Returns VariablePathResolvingStatus.Success if AllVariables of this path can be resolved from variablesValues and the path can be resolved into a drive letter or a UNC absolute file path.

VariablePathResolvingStatus TryResolve(IEnumerable<KeyValuePair<string, string>> variablesValues, out IAbsoluteFilePath pathFileResolved, out IReadOnlyList<string> unresolvedVariables)

Parameters

variablesValues IEnumerable<KeyValuePair<string, string>>

It is the sequence of pairs [variable name/variable value] used to resolve the path.

pathFileResolved IAbsoluteFilePath

It is the absolute file path resolved obtained if this method returns VariablePathResolvingStatus.Success.

unresolvedVariables IReadOnlyList<string>

This list contains one or several variables names unresolved, if this method returns VariablePathResolvingStatus.ErrorUnresolvedVariable.

Returns

VariablePathResolvingStatus

TryResolve(IEnumerable<KeyValuePair<string, string>>, out IAbsoluteFilePath, out string)

Returns true if AllVariables of this path can be resolved from variablesValues and the path can be resolved into a drive letter or a UNC absolute file path.

bool TryResolve(IEnumerable<KeyValuePair<string, string>> variablesValues, out IAbsoluteFilePath pathFileResolved, out string failureReason)

Parameters

variablesValues IEnumerable<KeyValuePair<string, string>>

It is the sequence of pairs [variable name/variable value] used to resolve the path.

pathFileResolved IAbsoluteFilePath

It is the absolute file path resolved obtained if this method returns true.

failureReason string

If false is returned, failureReason contains the plain english description of the failure.

Returns

bool

UpdateExtension(string)

Returns a new file path containing variables, representing this file with its file name extension updated to newExtension.

IVariableFilePath UpdateExtension(string newExtension)

Parameters

newExtension string

The new file extension. It must begin with a dot followed by one or many characters.

Returns

IVariableFilePath