This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/GitHub.Exports/Primitives Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 33
44namespace GitHub . Primitives
55{
6+ /// <summary>
7+ /// Convert to and from Git paths.
8+ /// </summary>
69 public static class Paths
710 {
811 public const char GitDirectorySeparatorChar = '/' ;
912
13+ /// <summary>
14+ /// Convert from a relative path to a Git path.
15+ /// </summary>
16+ /// <param name="relativePath">A relative path.</param>
17+ /// <returns>A working directory relative path which uses the '/' directory separator.</returns>
1018 public static string ToGitPath ( string relativePath )
1119 {
1220 return relativePath . Replace ( Path . DirectorySeparatorChar , GitDirectorySeparatorChar ) ;
1321 }
1422
15- public static string ToRelativePath ( string relativePath )
23+ /// <summary>
24+ /// Convert from a Git path to a relative path.
25+ /// </summary>
26+ /// <param name="gitPath">A working directory relative path which uses the '/' directory separator.</param>
27+ /// <returns>A relative paht that uses the <see cref="Path.DirectorySeparatorChar"/> directory separator.</returns>
28+ public static string ToRelativePath ( string gitPath )
1629 {
17- return relativePath . Replace ( GitDirectorySeparatorChar , Path . DirectorySeparatorChar ) ;
30+ return gitPath . Replace ( GitDirectorySeparatorChar , Path . DirectorySeparatorChar ) ;
1831 }
1932 }
2033}
You can’t perform that action at this time.
0 commit comments