C# Class Gammtek.Conduit.Paths.PathHelpers

Contains extensions methods to obtain a path object from a string and to check that a string indeed represents a valid path.
Datei anzeigen Open project: ME3Explorer/ME3Explorer

Public Methods

Method Description
EqualsNullSupported ( this path, IPath otherPath ) : bool

Returns true if path and otherPath are both null, or if path.Equals( otherPath).

IsNotNullAndExists ( this path ) : bool

Returns true if path is not null, and path.IAbsolutePath.Exists equals true.

IsValidAbsoluteDirectoryPath ( this path ) : bool

Determine whether this string is a valid absolute directory path or not.

If this method returns true, the extension method ToAbsoluteDirectoryPath(string) can be safely invoked on this string to obtain a IAbsoluteDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidAbsoluteDirectoryPath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid absolute directory path or not.

If this method returns true, the extension method ToAbsoluteDirectoryPath(string) can be safely invoked on this string to obtain a IAbsoluteDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidAbsoluteFilePath ( this path ) : bool

Determine whether this string is a valid file absolute path or not.

If this method returns true, the extension method ToAbsoluteFilePath(string) can be safely invoked on this string to obtain a IAbsoluteFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidAbsoluteFilePath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid file absolute path or not.

If this method returns true, the extension method ToAbsoluteFilePath(string) can be safely invoked on this string to obtain a IAbsoluteFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidDirectoryPath ( this path ) : bool

Determine whether this string is a valid directory path or not.

If this method returns true, the extension method ToDirectoryPath(string) can be safely invoked on this string to obtain a IDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidDirectoryPath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid directory path or not.

If this method returns true, the extension method ToDirectoryPath(string) can be safely invoked on this string to obtain a IDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidEnvVarDirectoryPath ( this path ) : bool

Determine whether this string is a valid directory path prefixed with an environment variable or not.

If this method returns true, the extension method ToEnvVarDirectoryPath(string) can be safely invoked on this string to obtain a IEnvironmentVariableDirectoryPath.

IsValidEnvVarDirectoryPath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid directory path prefixed with an environment variable or not.

If this method returns true, the extension method ToEnvVarDirectoryPath(string) can be safely invoked on this string to obtain a IEnvironmentVariableDirectoryPath.

IsValidEnvVarFilePath ( this path ) : bool

Determine whether this string is a valid file path prefixed with an environment variable or not.

If this method returns true, the extension method ToEnvVarFilePath(string) can be safely invoked on this string to obtain a IEnvironmentVariableFilePath.

IsValidEnvVarFilePath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid file path prefixed with an environment variable or not.

If this method returns true, the extension method ToEnvVarFilePath(string) can be safely invoked on this string to obtain a IEnvironmentVariableFilePath.

IsValidFilePath ( this path ) : bool

Determine whether this string is a valid file path or not.

If this method returns true, the extension method ToFilePath(string) can be safely invoked on this string to obtain a IFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidFilePath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid file path or not.

If this method returns true, the extension method ToFilePath(string) can be safely invoked on this string to obtain a IFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.

IsValidRelativeDirectoryPath ( this path ) : bool

Determine whether this string is a valid relative directory path or not.

If this method returns true, the extension method ToRelativeDirectoryPath(string) can be safely invoked on this string to obtain a IRelativeDirectoryPath.

IsValidRelativeDirectoryPath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid relative directory path or not.

If this method returns true, the extension method ToRelativeDirectoryPath(string) can be safely invoked on this string to obtain a IRelativeDirectoryPath.

IsValidRelativeFilePath ( this path ) : bool

Determine whether this string is a valid relative file path or not.

If this method returns true, the extension method ToRelativeFilePath(string) can be safely invoked on this string to obtain a IRelativeFilePath.

IsValidRelativeFilePath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid relative file path or not.

If this method returns true ToRelativeFilePath(string) can be safely invoked on this string to obtain a IRelativeFilePath.

IsValidVariableDirectoryPath ( this path ) : bool

Determine whether this string is a valid directory path that contains variables.

If this method returns true, the extension method ToVariableDirectoryPath(string) can be safely invoked on this string to obtain a IVariableDirectoryPath.

IsValidVariableDirectoryPath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid directory path that contains variables.

If this method returns true, the extension method ToVariableDirectoryPath(string) can be safely invoked on this string to obtain a IVariableDirectoryPath.

IsValidVariableFilePath ( this path ) : bool

Determine whether this string is a valid file that contains variables, or not.

If this method returns true, the extension method ToVariableFilePath(string) can be safely invoked on this string to obtain a IVariableFilePath.

IsValidVariableFilePath ( this path, string &failureMessage ) : bool

Determine whether this string is a valid file that contains variables, or not.

If this method returns true, the extension method ToVariableFilePath(string) can be safely invoked on this string to obtain a IVariableFilePath.

ToAbsoluteDirectoryPath ( this path ) : IAbsoluteDirectoryPath

Returns a new IAbsoluteDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidAbsoluteDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToAbsoluteFilePath ( this path ) : IAbsoluteFilePath

Returns a new IAbsoluteFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidAbsoluteFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToDirectoryPath ( this path ) : IDirectoryPath

Returns a new IDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToEnvVarDirectoryPath ( this path ) : IEnvironmentVariableDirectoryPath

Returns a new IEnvironmentVariableDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly. The method IsValidEnvVarDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToEnvVarFilePath ( this path ) : IEnvironmentVariableFilePath

Returns a new IEnvironmentVariableFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly. The method IsValidEnvVarFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToFilePath ( this path ) : IFilePath

Returns a new IFilePath object object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToRelativeDirectoryPath ( this path ) : IRelativeDirectoryPath

Returns a new IRelativeDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidRelativeDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToRelativeFilePath ( this path ) : IRelativeFilePath

Returns a new IRelativeFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidRelativeFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToStringOrIfNullToEmptyString ( this path ) : string

Returns path.ToString() is path is null, else returns the empty string.

ToVariableDirectoryPath ( this path ) : IVariableDirectoryPath

Returns a new IVariableDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidVariableDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.

ToVariableFilePath ( this path ) : IVariableFilePath

Returns a new IVariableFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidVariableFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.

TryGetAbsoluteDirectoryPath ( this path, IAbsoluteDirectoryPath &absolutePath ) : bool

Try get a new IAbsoluteDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetAbsoluteDirectoryPath ( this path, IAbsoluteDirectoryPath &absolutePath, string &failureMessage ) : bool

Try get a new IAbsoluteDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetAbsoluteFilePath ( this path, IAbsoluteFilePath &absolutePath ) : bool

Try get a new IAbsoluteFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetAbsoluteFilePath ( this path, IAbsoluteFilePath &absolutePath, string &failureMessage ) : bool

Try get a new IAbsoluteFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetDirectoryPath ( this path, IDirectoryPath &directoryPath ) : bool

Try get a new IDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetDirectoryPath ( this path, IDirectoryPath &directoryPath, string &failureMessage ) : bool

Try get a new IDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetEnvVarDirectoryPath ( this path, IEnvironmentVariableDirectoryPath &directoryPath ) : bool

Try get a new IEnvironmentVariableDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.

TryGetEnvVarDirectoryPath ( this path, IEnvironmentVariableDirectoryPath &directoryPath, string &failureMessage ) : bool

Try get a new IEnvironmentVariableDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.

TryGetEnvVarFilePath ( this path, IEnvironmentVariableFilePath &filePath ) : bool

Try get a new IEnvironmentVariableFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.

TryGetEnvVarFilePath ( this path, IEnvironmentVariableFilePath &filePath, string &failureMessage ) : bool

Try get a new IEnvironmentVariableFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.

TryGetFilePath ( this path, IFilePath &filePath ) : bool

Try get a new IFilePath object object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetFilePath ( this path, IFilePath &filePath, string &failureMessage ) : bool

Try get a new IFilePath object object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetRelativeDirectoryPath ( this path, IRelativeDirectoryPath &relativePath ) : bool

Try get a new IAbsoluteDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetRelativeDirectoryPath ( this path, IRelativeDirectoryPath &relativePath, string &failureMessage ) : bool

Try get a new IAbsoluteDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetRelativeFilePath ( this path, IRelativeFilePath &relativePath ) : bool

Try get a new IRelativeFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetRelativeFilePath ( this path, IRelativeFilePath &relativePath, string &failureMessage ) : bool

Try get a new IRelativeFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetVariableDirectoryPath ( this path, IVariableDirectoryPath &directoryPath ) : bool

Try get a new IVariableDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetVariableDirectoryPath ( this path, IVariableDirectoryPath &directoryPath, string &failureMessage ) : bool

Try get a new IVariableDirectoryPath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetVariableFilePath ( this path, IVariableFilePath &filePath ) : bool

Try get a new IVariableFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

TryGetVariableFilePath ( this path, IVariableFilePath &filePath, string &failureMessage ) : bool

Try get a new IVariableFilePath object from this string.

The path represented by this string doesn't need to exist for this operation to complete properly.

Private Methods

Method Description
IsNullOrEmpty ( Expression expression, string &failureMessage ) : bool
IsThisValidDirectoryPathAValidFilePath ( this path, string &fileName, string &failureMessage ) : bool
IsValidPathVariableName ( this variableName ) : bool
IsValidPathVariableValue ( this variableValue ) : bool
TryGetNotNullNormalizedPath ( this path, string &normalizedPath, string &failureMessage ) : bool

Method Details

EqualsNullSupported() public static method

Returns true if path and otherPath are both null, or if path.Equals( otherPath).
public static EqualsNullSupported ( this path, IPath otherPath ) : bool
path this The first path.
otherPath IPath The scond path.
return bool

IsNotNullAndExists() public static method

Returns true if path is not null, and path.IAbsolutePath.Exists equals true.
public static IsNotNullAndExists ( this path ) : bool
path this The path reference.
return bool

IsValidAbsoluteDirectoryPath() public static method

Determine whether this string is a valid absolute directory path or not.
If this method returns true, the extension method ToAbsoluteDirectoryPath(string) can be safely invoked on this string to obtain a IAbsoluteDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidAbsoluteDirectoryPath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidAbsoluteDirectoryPath() public static method

Determine whether this string is a valid absolute directory path or not.
If this method returns true, the extension method ToAbsoluteDirectoryPath(string) can be safely invoked on this string to obtain a IAbsoluteDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidAbsoluteDirectoryPath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidAbsoluteFilePath() public static method

Determine whether this string is a valid file absolute path or not.
If this method returns true, the extension method ToAbsoluteFilePath(string) can be safely invoked on this string to obtain a IAbsoluteFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidAbsoluteFilePath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidAbsoluteFilePath() public static method

Determine whether this string is a valid file absolute path or not.
If this method returns true, the extension method ToAbsoluteFilePath(string) can be safely invoked on this string to obtain a IAbsoluteFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidAbsoluteFilePath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidDirectoryPath() public static method

Determine whether this string is a valid directory path or not.
If this method returns true, the extension method ToDirectoryPath(string) can be safely invoked on this string to obtain a IDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidDirectoryPath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidDirectoryPath() public static method

Determine whether this string is a valid directory path or not.
If this method returns true, the extension method ToDirectoryPath(string) can be safely invoked on this string to obtain a IDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidDirectoryPath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidEnvVarDirectoryPath() public static method

Determine whether this string is a valid directory path prefixed with an environment variable or not.
If this method returns true, the extension method ToEnvVarDirectoryPath(string) can be safely invoked on this string to obtain a IEnvironmentVariableDirectoryPath.
public static IsValidEnvVarDirectoryPath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidEnvVarDirectoryPath() public static method

Determine whether this string is a valid directory path prefixed with an environment variable or not.
If this method returns true, the extension method ToEnvVarDirectoryPath(string) can be safely invoked on this string to obtain a IEnvironmentVariableDirectoryPath.
public static IsValidEnvVarDirectoryPath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidEnvVarFilePath() public static method

Determine whether this string is a valid file path prefixed with an environment variable or not.
If this method returns true, the extension method ToEnvVarFilePath(string) can be safely invoked on this string to obtain a IEnvironmentVariableFilePath.
public static IsValidEnvVarFilePath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidEnvVarFilePath() public static method

Determine whether this string is a valid file path prefixed with an environment variable or not.
If this method returns true, the extension method ToEnvVarFilePath(string) can be safely invoked on this string to obtain a IEnvironmentVariableFilePath.
public static IsValidEnvVarFilePath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidFilePath() public static method

Determine whether this string is a valid file path or not.
If this method returns true, the extension method ToFilePath(string) can be safely invoked on this string to obtain a IFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidFilePath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidFilePath() public static method

Determine whether this string is a valid file path or not.
If this method returns true, the extension method ToFilePath(string) can be safely invoked on this string to obtain a IFilePath. Notice that this method can return true even if the path represented by this string doesn't exist.
public static IsValidFilePath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidRelativeDirectoryPath() public static method

Determine whether this string is a valid relative directory path or not.
If this method returns true, the extension method ToRelativeDirectoryPath(string) can be safely invoked on this string to obtain a IRelativeDirectoryPath.
public static IsValidRelativeDirectoryPath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidRelativeDirectoryPath() public static method

Determine whether this string is a valid relative directory path or not.
If this method returns true, the extension method ToRelativeDirectoryPath(string) can be safely invoked on this string to obtain a IRelativeDirectoryPath.
public static IsValidRelativeDirectoryPath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidRelativeFilePath() public static method

Determine whether this string is a valid relative file path or not.
If this method returns true, the extension method ToRelativeFilePath(string) can be safely invoked on this string to obtain a IRelativeFilePath.
public static IsValidRelativeFilePath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidRelativeFilePath() public static method

Determine whether this string is a valid relative file path or not.
If this method returns true ToRelativeFilePath(string) can be safely invoked on this string to obtain a IRelativeFilePath.
public static IsValidRelativeFilePath ( this path, string &failureMessage ) : bool
path this this string
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidVariableDirectoryPath() public static method

Determine whether this string is a valid directory path that contains variables.
If this method returns true, the extension method ToVariableDirectoryPath(string) can be safely invoked on this string to obtain a IVariableDirectoryPath.
public static IsValidVariableDirectoryPath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidVariableDirectoryPath() public static method

Determine whether this string is a valid directory path that contains variables.
If this method returns true, the extension method ToVariableDirectoryPath(string) can be safely invoked on this string to obtain a IVariableDirectoryPath.
public static IsValidVariableDirectoryPath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

IsValidVariableFilePath() public static method

Determine whether this string is a valid file that contains variables, or not.
If this method returns true, the extension method ToVariableFilePath(string) can be safely invoked on this string to obtain a IVariableFilePath.
public static IsValidVariableFilePath ( this path ) : bool
path this This string from which is determined the path validity.
return bool

IsValidVariableFilePath() public static method

Determine whether this string is a valid file that contains variables, or not.
If this method returns true, the extension method ToVariableFilePath(string) can be safely invoked on this string to obtain a IVariableFilePath.
public static IsValidVariableFilePath ( this path, string &failureMessage ) : bool
path this This string from which is determined the path validity.
failureMessage string If false is returned, failureReason contains the plain english description of the failure.
return bool

ToAbsoluteDirectoryPath() public static method

Returns a new IAbsoluteDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidAbsoluteDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. is empty or doesn't represents a valid absolute directory path.
public static ToAbsoluteDirectoryPath ( this path ) : IAbsoluteDirectoryPath
path this Represents the path.
return IAbsoluteDirectoryPath

ToAbsoluteFilePath() public static method

Returns a new IAbsoluteFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidAbsoluteFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. is empty or doesn't represents a valid absolute file path.
public static ToAbsoluteFilePath ( this path ) : IAbsoluteFilePath
path this Represents the path.
return IAbsoluteFilePath

ToDirectoryPath() public static method

Returns a new IDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. /// is empty or doesn't represents a valid relative or absolute directory path or a /// valid directory path prefixed with an environment variable. ///
public static ToDirectoryPath ( this path ) : IDirectoryPath
path this Represents the path.
return IDirectoryPath

ToEnvVarDirectoryPath() public static method

Returns a new IEnvironmentVariableDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly. The method IsValidEnvVarDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. /// is empty or doesn't represents a valid directory path prefixed with an environment /// variable. ///
public static ToEnvVarDirectoryPath ( this path ) : IEnvironmentVariableDirectoryPath
path this Represents the path.
return IEnvironmentVariableDirectoryPath

ToEnvVarFilePath() public static method

Returns a new IEnvironmentVariableFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly. The method IsValidEnvVarFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. /// is empty or doesn't represents a valid file path prefixed with an environment /// variable. ///
public static ToEnvVarFilePath ( this path ) : IEnvironmentVariableFilePath
path this Represents the path.
return IEnvironmentVariableFilePath

ToFilePath() public static method

Returns a new IFilePath object object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. /// is empty or doesn't represents a valid relative or absolute file path or a valid /// file path prefixed with an environment variable. ///
public static ToFilePath ( this path ) : IFilePath
path this Represents the path.
return IFilePath

ToRelativeDirectoryPath() public static method

Returns a new IRelativeDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidRelativeDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. is empty or doesn't represents a valid relative directory path.
public static ToRelativeDirectoryPath ( this path ) : IRelativeDirectoryPath
path this Represents the path.
return IRelativeDirectoryPath

ToRelativeFilePath() public static method

Returns a new IRelativeFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidRelativeFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. is empty or doesn't represents a valid relative file path.
public static ToRelativeFilePath ( this path ) : IRelativeFilePath
path this Represents the path.
return IRelativeFilePath

ToStringOrIfNullToEmptyString() public static method

Returns path.ToString() is path is null, else returns the empty string.
public static ToStringOrIfNullToEmptyString ( this path ) : string
path this The path reference.
return string

ToVariableDirectoryPath() public static method

Returns a new IVariableDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidVariableDirectoryPath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. is empty or doesn't represents a valid directory path that contains variables.
public static ToVariableDirectoryPath ( this path ) : IVariableDirectoryPath
path this Represents the path.
return IVariableDirectoryPath

ToVariableFilePath() public static method

Returns a new IVariableFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The method IsValidVariableFilePath(string) can be called to enfore path validity before calling this method, and avoid any exception.
is null. is empty or doesn't represents a valid file path that contains variables.
public static ToVariableFilePath ( this path ) : IVariableFilePath
path this Represents the path.
return IVariableFilePath

TryGetAbsoluteDirectoryPath() public static method

Try get a new IAbsoluteDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetAbsoluteDirectoryPath ( this path, IAbsoluteDirectoryPath &absolutePath ) : bool
path this Represents the path.
absolutePath IAbsoluteDirectoryPath If this method returns true, this is the returned path object.
return bool

TryGetAbsoluteDirectoryPath() public static method

Try get a new IAbsoluteDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetAbsoluteDirectoryPath ( this path, IAbsoluteDirectoryPath &absolutePath, string &failureMessage ) : bool
path this Represents the path.
absolutePath IAbsoluteDirectoryPath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetAbsoluteFilePath() public static method

Try get a new IAbsoluteFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetAbsoluteFilePath ( this path, IAbsoluteFilePath &absolutePath ) : bool
path this Represents the path string.
absolutePath IAbsoluteFilePath If this method returns true, this is the returned path object.
return bool

TryGetAbsoluteFilePath() public static method

Try get a new IAbsoluteFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetAbsoluteFilePath ( this path, IAbsoluteFilePath &absolutePath, string &failureMessage ) : bool
path this Represents the path string.
absolutePath IAbsoluteFilePath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetDirectoryPath() public static method

Try get a new IDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetDirectoryPath ( this path, IDirectoryPath &directoryPath ) : bool
path this Represents the path.
directoryPath IDirectoryPath If this method returns true, this is the returned path object.
return bool

TryGetDirectoryPath() public static method

Try get a new IDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetDirectoryPath ( this path, IDirectoryPath &directoryPath, string &failureMessage ) : bool
path this Represents the path.
directoryPath IDirectoryPath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetEnvVarDirectoryPath() public static method

Try get a new IEnvironmentVariableDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.
public static TryGetEnvVarDirectoryPath ( this path, IEnvironmentVariableDirectoryPath &directoryPath ) : bool
path this Represents the path.
directoryPath IEnvironmentVariableDirectoryPath If this method returns true, this is the returned path object.
return bool

TryGetEnvVarDirectoryPath() public static method

Try get a new IEnvironmentVariableDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.
public static TryGetEnvVarDirectoryPath ( this path, IEnvironmentVariableDirectoryPath &directoryPath, string &failureMessage ) : bool
path this Represents the path.
directoryPath IEnvironmentVariableDirectoryPath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetEnvVarFilePath() public static method

Try get a new IEnvironmentVariableFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.
public static TryGetEnvVarFilePath ( this path, IEnvironmentVariableFilePath &filePath ) : bool
path this Represents the path.
filePath IEnvironmentVariableFilePath If this method returns true, this is the returned path object.
return bool

TryGetEnvVarFilePath() public static method

Try get a new IEnvironmentVariableFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly. The environment variable prefixing the path doesn't need to exist for this operation to complete properly.
public static TryGetEnvVarFilePath ( this path, IEnvironmentVariableFilePath &filePath, string &failureMessage ) : bool
path this Represents the path.
filePath IEnvironmentVariableFilePath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetFilePath() public static method

Try get a new IFilePath object object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetFilePath ( this path, IFilePath &filePath ) : bool
path this Represents the path.
filePath IFilePath If this method returns true, this is the returned path object.
return bool

TryGetFilePath() public static method

Try get a new IFilePath object object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetFilePath ( this path, IFilePath &filePath, string &failureMessage ) : bool
path this Represents the path.
filePath IFilePath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetRelativeDirectoryPath() public static method

Try get a new IAbsoluteDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetRelativeDirectoryPath ( this path, IRelativeDirectoryPath &relativePath ) : bool
path this Represents the path.
relativePath IRelativeDirectoryPath If this method returns true, this is the returned path object.
return bool

TryGetRelativeDirectoryPath() public static method

Try get a new IAbsoluteDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetRelativeDirectoryPath ( this path, IRelativeDirectoryPath &relativePath, string &failureMessage ) : bool
path this Represents the path.
relativePath IRelativeDirectoryPath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetRelativeFilePath() public static method

Try get a new IRelativeFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetRelativeFilePath ( this path, IRelativeFilePath &relativePath ) : bool
path this Represents the path.
relativePath IRelativeFilePath If this method returns true, this is the returned path object.
return bool

TryGetRelativeFilePath() public static method

Try get a new IRelativeFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetRelativeFilePath ( this path, IRelativeFilePath &relativePath, string &failureMessage ) : bool
path this Represents the path.
relativePath IRelativeFilePath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetVariableDirectoryPath() public static method

Try get a new IVariableDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetVariableDirectoryPath ( this path, IVariableDirectoryPath &directoryPath ) : bool
path this Represents the path.
directoryPath IVariableDirectoryPath If this method returns true, this is the returned path object.
return bool

TryGetVariableDirectoryPath() public static method

Try get a new IVariableDirectoryPath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetVariableDirectoryPath ( this path, IVariableDirectoryPath &directoryPath, string &failureMessage ) : bool
path this Represents the path.
directoryPath IVariableDirectoryPath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool

TryGetVariableFilePath() public static method

Try get a new IVariableFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetVariableFilePath ( this path, IVariableFilePath &filePath ) : bool
path this Represents the path.
filePath IVariableFilePath If this method returns true, this is the returned path object.
return bool

TryGetVariableFilePath() public static method

Try get a new IVariableFilePath object from this string.
The path represented by this string doesn't need to exist for this operation to complete properly.
public static TryGetVariableFilePath ( this path, IVariableFilePath &filePath, string &failureMessage ) : bool
path this Represents the path.
filePath IVariableFilePath If this method returns true, this is the returned path object.
failureMessage string If this method returns false, this is the plain english description of the failure.
return bool