public static string CreateFolderWithQuickID(string ownerID, string parentFolderID, string newFolderID, string folderName, string quickID) { File file = new File(); file.ClientIP = ""; file.ContentType = ""; file.ConvertToPDFSuccessed = false; file.CreateTime = DateTime.Now; file.ExtendFileName = ""; file.FileID = newFolderID; file.FileSize = 0L; file.FileState = FileStates.Normal; file.FileType = FileTypes.Folder; file.Keyword = ""; file.Memo = ""; file.OriginalFileName = folderName; file.OwnerID = ownerID; file.ParentID = parentFolderID; file.PDFAbsolutePath = ""; file.PDFAbsoluteFileName = ""; file.PDFRelativePath = ""; file.StoreAbsolutePath = ""; file.StoreRelativePath = ""; file.StorageAbsoluteFileName = ""; file.Tag = ""; file.Title = folderName; file.TokenID = Guid.NewGuid().ToString(); file.UploaderID = ownerID; file.QuickID = quickID; File fileByID = FileSystemService.GetFileByID(parentFolderID); if (fileByID != null) { file.DisplayInNotifications = fileByID.DisplayInNotifications; file.PublicDownload = fileByID.PublicDownload; file.PublicReview = fileByID.PublicReview; file.DownloadAfterPermit = fileByID.DownloadAfterPermit; file.PreviewAfterPermit = fileByID.PreviewAfterPermit; } string result; try { FileSystemService.fileGateway.AddNew(file); result = "SUCCESSED"; } catch (Exception arg_157_0) { result = arg_157_0.Message; } return(result); }
public static string GetFilePath(string fileID) { IList <File> parentFolders = FileSystemService.GetParentFolders(fileID); File fileByID = FileSystemService.GetFileByID(fileID); string text = string.Empty; for (int i = parentFolders.Count - 1; i >= 1; i--) { text = text + parentFolders[i].OriginalFileName + "/"; } text += fileByID.OriginalFileName; return("//" + text); }
public static File GetFileByIDWithExtendProperties(string fileID) { return(FileSystemService.ReadExtendPropertiesOfFile(FileSystemService.GetFileByID(fileID))); }