SenseNet.ContentRepository.Storage.IndexDirectory.GetCurrentDirectory C# (CSharp) Method

GetCurrentDirectory() private method

private GetCurrentDirectory ( ) : string
return string
        private string GetCurrentDirectory()
        {
            var root = StorageContext.Search.IndexDirectoryPath;
            var rootExists = System.IO.Directory.Exists(root);
            string path = null;
            if (rootExists)
            {
                EnsureFirstDirectory(root);
                path = System.IO.Directory.GetDirectories(root)
                    .Where(a => Char.IsDigit(System.IO.Path.GetFileName(a)[0]))
                    .OrderBy(s => s)
                    .LastOrDefault();
            }
            Debug.WriteLine(String.Format("@> {0} -------- GetCurrentDirectory: {1}", AppDomain.CurrentDomain.FriendlyName, (path ?? "[null]")));
            return path;
        }
        private void EnsureFirstDirectory(string root)