Umbraco.Belle.System.ManifestParser.FolderDepth C# (CSharp) Méthode

FolderDepth() static private méthode

Get the folder depth compared to the base folder
static private FolderDepth ( DirectoryInfo baseDir, DirectoryInfo currDir ) : int
baseDir System.IO.DirectoryInfo
currDir System.IO.DirectoryInfo
Résultat int
        internal static int FolderDepth(DirectoryInfo baseDir, DirectoryInfo currDir)
        {
            var removed = currDir.FullName.Remove(0, baseDir.FullName.Length).TrimStart('\\').TrimEnd('\\');
            return removed.Split(new char[] {'\\'}, StringSplitOptions.RemoveEmptyEntries).Length;
        }