Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit e46f894

Browse files
committed
Add xmldoc comments to Paths
1 parent ff60575 commit e46f894

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/GitHub.Exports/Primitives/Paths.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,31 @@
33

44
namespace 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
}

0 commit comments

Comments
 (0)