/// <summary> /// Gets the file information for a path below the <see cref="Root"/>. /// Never return null: <see cref="NotFoundFileInfo"/> is returned when the file does not exist. /// </summary> /// <param name="subpath">The subordinated path.</param> /// <returns>The file info.</returns> public IFileInfo GetFileInfo(NormalizedPath sub) { sub = sub.ResolveDots().With(NormalizedPathRootKind.None); GitFolder g = GitFolders.FirstOrDefault(f => sub.StartsWith(f.SubPath, strict: false)); return(g != null ? g.GetFileInfo(sub.RemovePrefix(g.SubPath)) ?? new NotFoundFileInfo(sub.Path) : PhysicalGetFileInfo(sub)); }