public static void RebuildAllBundles(IRequestHandler requestHandler) { foreach (FileInfo bundleFileInfo in FileSystemRepository.GetFiles(PathManager.GetBundlesPath(requestHandler), "*.json", null)) { BandleManager.RebuildBundle(requestHandler, bundleFileInfo.Name); } }
public static IEnumerable <FileInfo> GetFiles(string path, string searchPattern, string filter) { string[] paths = FileSystemRepository.GetFilteredFiles(path, searchPattern, filter); IEnumerable <FileInfo> files = paths.Select(p => new FileInfo(p)); return(files); }
public static IEnumerable <FileInfo> GetFiles(string path, string searchPattern, string filter, string orderBy, string direction, int skip, int take) { IEnumerable <FileInfo> files = FileSystemRepository.GetFiles(path, searchPattern, filter); if (orderBy == "filename" && direction == "asc") { files = files.OrderBy(f => f.Name); } else if (orderBy == "filename" && direction == "desc") { files = files.OrderByDescending(f => f.Name); } return(files.Skip(skip).Take(take)); }
public static int CountFiles(string path, string searchPattern, string filter) { return(FileSystemRepository.GetFilteredFiles(path, searchPattern, filter).Count()); }