ttaenc.AlbumReader.GetDirectoryIndex C# (CSharp) Method

GetDirectoryIndex() static private method

static private GetDirectoryIndex ( string path ) : uint
path string
return uint
        static uint GetDirectoryIndex(string path)
        {
            var name = Path.GetFileName(path);
            var dir = Path.GetDirectoryName(path);
            return (uint)new DirectoryInfo(dir).GetFileSystemInfos()
                .OrderBy(_ => _.Name)
                .Select((info, index) => new { Info = info, Index = index })
                .Single(_ => object.Equals(_.Info.Name, name)).Index;
        }