Exemple #1
0
        /// <summary>
        /// Gets the directory content for a path below the <see cref="Root"/>.
        /// </summary>
        /// <param name="subpath">The subordinated path.</param>
        /// <returns>The directory content.</returns>
        public IDirectoryContents GetDirectoryContents(NormalizedPath sub)
        {
            sub = sub.ResolveDots().With(NormalizedPathRootKind.None);
            GitFolder g = GitFolders.FirstOrDefault(f => sub.StartsWith(f.SubPath, strict: false));

            return(g != null
                        ? g.GetDirectoryContents(sub.RemovePrefix(g.SubPath)) ?? NotFoundDirectoryContents.Singleton
                        : PhysicalGetDirectoryContents(sub));
        }