예제 #1
0
 public static void RebuildAllBundles(IRequestHandler requestHandler)
 {
     foreach (FileInfo bundleFileInfo in FileSystemRepository.GetFiles(PathManager.GetBundlesPath(requestHandler), "*.json", null))
     {
         BandleManager.RebuildBundle(requestHandler, bundleFileInfo.Name);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }
예제 #4
0
 public static int CountFiles(string path, string searchPattern, string filter)
 {
     return(FileSystemRepository.GetFilteredFiles(path, searchPattern, filter).Count());
 }