VersionControlPath.MakeRelative Method
Include Protected Members
Include Inherited Members
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
Name | Description | |
---|---|---|
MakeRelative(String, String) | Given a path and folder, returns the path relative to the folder. If the path is not under the folder the path is returned unmodified. Both path and folder are assumed to be in canonical form. Examples: MakeRelative(@"$/src/project/abc.cpp", @"$/src") -> @"project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/specs") -> @"$/src/project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/src/proj") -> @"$/src/project/abc.cpp" | |
MakeRelative(String, String, Boolean) | Given a path and folder, returns the path relative to the folder. If the path is not under the folder and the recursive parameter is false then path is returned unmodified. Otherwise, the method iteratively each parent directory in the specified folder and tries to make item relative. Both path and folder are assumed to be in canonical form. Examples: MakeRelative(@"$/src/project/abc.cpp", @"$/src",false) -> @"project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/specs",false) -> @"$/src/project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/src/proj",false) -> @"$/src/project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/src", true) -> @"project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/specs", true) -> @"../src/project/abc.cpp" MakeRelative(@"$/src/project/abc.cpp", @"$/src/proj", true) -> @"../project/abc.cpp" |
Top