コード例 #1
0
        IEnumerable <ThemedFileElement> ReadFileSystem()
        {
            string basePath = BasePath.GetBasePath(basePathId);

            Directory.CreateDirectory(basePath);

            return(Directory.EnumerateFiles(basePath)
                   .Select(file => new { file, accessTime = File.GetLastAccessTime(file) })
                   .OrderByDescending(projection => projection.accessTime)
                   .Select(projection => new ThemedFileElement(projection.file, projection.accessTime, basePathId)));
        }