public string GetUserListDownloadUrl() { //Aggregate the current data into one csv file ICentralizedFileStorageProvider fs = CentralizedFileStorage.GetFileStore(Constants.FILESTOREKEY); if (fs != null) { var header = fs.GetFile("", _headerFileName); if (header != null) { StringBuilder fileBuffer = new StringBuilder(); using (StreamReader sr = new StreamReader(header.OpenReadStream())) { fileBuffer.AppendLine(sr.ReadToEnd()); } //Build a new csv file foreach (var response in fs.GetFiles(_responsesFolder, PathSearchOption.AllPaths)) { using (StreamReader sr = new StreamReader(response.OpenReadStream())) { fileBuffer.Append(sr.ReadToEnd()); } } return(WriteFileToCfs(fileBuffer, "", "userlist.csv").GetDownloadUrl()); } } return(null); }
internal void GenerateHostVersionedSourceMaps() { ICentralizedFileStorageProvider fileStore = CentralizedFileStorage.GetFileStore(Constants.ThemeFiles); string stylesheetPath = string.Format(@"s.fd.{0}.{1}", _siteThemeName, Constants.ThemeStylesheetFiles); var files = fileStore.GetFiles(stylesheetPath, PathSearchOption.TopLevelPathOnly); // Update source maps foreach (ICentralizedFile file in files.Where(f => f.FileName.EndsWith(".css"))) { UpsertSourceMap(file.FileName, file.FileStoreKey, file.Path); } }
protected void ListDataBind() { if (fileStore == null) { //plugin is not enabled, bail out return; } list.Items.Clear(); PathSearchOption search = new PathSearchOption(); IEnumerable <ICentralizedFile> mune = fileStore.GetFiles(search); foreach (ICentralizedFile file in mune) { list.Items.Add(new ListItem(file.FileName)); } }