C# Class NSwag.CodeGeneration.Utilities.PathUtilities

Provides file path utility methods.
ファイルを表示 Open project: NSwag/NSwag

Public Methods

Method Description
ExpandFileWildcards ( IEnumerable paths ) : IEnumerable

Expands the given wildcards (** or *) in the paths.

ExpandFileWildcards ( string path ) : IEnumerable

Expands the given wildcards (** or *) in the path.

MakeAbsolutePath ( string relativePath, string relativeTo ) : string

Converts a relative path to an absolute path.

MakeRelativePath ( string absolutePath, string relativeTo ) : string

Converts an absolute path to a relative path if possible.

Method Details

ExpandFileWildcards() public static method

Expands the given wildcards (** or *) in the paths.
public static ExpandFileWildcards ( IEnumerable paths ) : IEnumerable
paths IEnumerable The files path with wildcards.
return IEnumerable

ExpandFileWildcards() public static method

Expands the given wildcards (** or *) in the path.
public static ExpandFileWildcards ( string path ) : IEnumerable
path string The file path with wildcards.
return IEnumerable

MakeAbsolutePath() public static method

Converts a relative path to an absolute path.
public static MakeAbsolutePath ( string relativePath, string relativeTo ) : string
relativePath string The relative path.
relativeTo string The current directory.
return string

MakeRelativePath() public static method

Converts an absolute path to a relative path if possible.
The path of the two files doesn't have any common base.
public static MakeRelativePath ( string absolutePath, string relativeTo ) : string
absolutePath string The absolute path.
relativeTo string The current directory.
return string