summaryrefslogtreecommitdiff
path: root/src/mscorlib/corefx/System/IO/PathInternal.Unix.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/corefx/System/IO/PathInternal.Unix.cs')
-rw-r--r--src/mscorlib/corefx/System/IO/PathInternal.Unix.cs42
1 files changed, 12 insertions, 30 deletions
diff --git a/src/mscorlib/corefx/System/IO/PathInternal.Unix.cs b/src/mscorlib/corefx/System/IO/PathInternal.Unix.cs
index 6c39f99556..08dc1d0251 100644
--- a/src/mscorlib/corefx/System/IO/PathInternal.Unix.cs
+++ b/src/mscorlib/corefx/System/IO/PathInternal.Unix.cs
@@ -10,11 +10,15 @@ namespace System.IO
/// <summary>Contains internal path helpers that are shared between many projects.</summary>
internal static partial class PathInternal
{
+ internal const char DirectorySeparatorChar = '/';
+ internal const char AltDirectorySeparatorChar = '/';
+ internal const char VolumeSeparatorChar = '/';
+ internal const char PathSeparator = ':';
+
+ internal const string DirectorySeparatorCharAsString = "/";
+
// There is only one invalid path character in Unix
private const char InvalidPathChar = '\0';
- internal static char[] GetInvalidPathChars() => new char[] { InvalidPathChar };
-
- internal static readonly int MaxComponentLength = Interop.Sys.MaxName;
internal const string ParentDirectoryPrefix = @"../";
@@ -34,24 +38,8 @@ namespace System.IO
{
// The alternate directory separator char is the same as the directory separator,
// so we only need to check one.
- Debug.Assert(Path.DirectorySeparatorChar == Path.AltDirectorySeparatorChar);
- return c == Path.DirectorySeparatorChar;
- }
-
- /// <summary>
- /// Returns true if the path is too long
- /// </summary>
- internal static bool IsPathTooLong(string fullPath)
- {
- return fullPath.Length >= Interop.Sys.MaxPath;
- }
-
- /// <summary>
- /// Returns true if the directory is too long
- /// </summary>
- internal static bool IsDirectoryTooLong(string fullPath)
- {
- return fullPath.Length >= Interop.Sys.MaxPath;
+ Debug.Assert(DirectorySeparatorChar == AltDirectorySeparatorChar);
+ return c == DirectorySeparatorChar;
}
/// <summary>
@@ -101,15 +89,9 @@ namespace System.IO
{
// The directory separator, volume separator, and the alternate directory
// separator should be the same on Unix, so we only need to check one.
- Debug.Assert(Path.DirectorySeparatorChar == Path.AltDirectorySeparatorChar);
- Debug.Assert(Path.DirectorySeparatorChar == Path.VolumeSeparatorChar);
- return ch == Path.DirectorySeparatorChar;
- }
-
- internal static bool HasInvalidVolumeSeparator(string path)
- {
- // This is only ever true for Windows
- return false;
+ Debug.Assert(DirectorySeparatorChar == AltDirectorySeparatorChar);
+ Debug.Assert(DirectorySeparatorChar == VolumeSeparatorChar);
+ return ch == DirectorySeparatorChar;
}
internal static bool IsPartiallyQualified(string path)