34 internal partial class VfsMount
38 readonly VfsEntry item;
45 public VfsMount(
string path, VfsEntry item)
48 throw new ArgumentNullException(nameof(path));
50 throw new ArgumentNullException(nameof(item));
59 public string Path => path;
64 public VfsEntry Item => item;
71 public bool IsPath(
string path) => path.StartsWith(this.path, StringComparison.Ordinal);
79 public VfsEntry GetEntry(
string path)
82 throw new ArgumentNullException(nameof(path));
86 for (
int i = 0; i < p.Length; i++)
89 if (c is VfsDirectory directory)
92 if ((c = directory.GetEntry(p[i])) ==
null)
Various extension methods for working with paths.
static string EnsureEndingDirectorySeparator(string path)
Ensures the given path ends with a directory separator.
static readonly char[] DirectorySeparatorChars