Various extension methods for working with paths.
More...
Various extension methods for working with paths.
Definition at line 9 of file PathExtensions.cs.
◆ EnsureEndingDirectorySeparator()
| static string IKVM.Runtime.Extensions.PathExtensions.EnsureEndingDirectorySeparator |
( |
string | path | ) |
|
|
static |
Ensures the given path ends with a directory separator.
- Parameters
-
- Returns
Definition at line 33 of file PathExtensions.cs.
34 {
35 return path[path.Length - 1] != Path.DirectorySeparatorChar ? path + Path.DirectorySeparatorChar : path;
36 }
◆ TrimEndingDirectorySeparator()
| static string IKVM.Runtime.Extensions.PathExtensions.TrimEndingDirectorySeparator |
( |
string | path | ) |
|
|
static |
Trims any ending directory separator characters are removed from the path.
- Parameters
-
- Returns
Definition at line 19 of file PathExtensions.cs.
20 {
21#if NETFRAMEWORK
23#else
24 return Path.TrimEndingDirectorySeparator(path);
25#endif
26 }
static readonly char[] DirectorySeparatorChars
◆ DirectorySeparatorChars
| readonly char [] IKVM.Runtime.Extensions.PathExtensions.DirectorySeparatorChars = new char[] { Path.DirectorySeparatorChar } |
|
static |
The documentation for this class was generated from the following file: