public FsItemInfo GetItemInfo(ReadOnlySpan<char> path) { var d = PathUtils.SplitDirAndFile(path, out var ff).ToString(); var f = ff.ToString(); if (_content.TryGetValue(new KeyValuePair<string, string>(d, f), out var file)) { if (file == null) return FsItemInfo.Directory(d, false); return FsItemInfo.Existing(d, file._length, file._lastWriteTimeUtc); } return FsItemInfo.Missing(); }
public FsItemInfo GetItemInfo(string path) { var fad = PathUtils.SplitDirAndFile(path); if (_content.TryGetValue(new KeyValuePair <string, string>(fad.Item1, fad.Item2), out var file)) { if (file == null) { return(FsItemInfo.Directory(fad.Item2, false)); } return(FsItemInfo.Existing(fad.Item2, file._length, file._lastWriteTimeUtc)); } return(FsItemInfo.Missing()); }