Interface IFileService
Service to get / create / upload / download files.
public interface IFileService
Methods
AddFileAsync(File)
Add / store a File record. This does not contain the file contents.
Task<File> AddFileAsync(File file)
Parameters
file
File
Returns
DeleteFileAsync(int)
Delete a File
Task DeleteFileAsync(int fileId)
Parameters
fileId
int
Returns
DownloadFileAsync(int)
Get / download a file (the body).
Task<byte[]> DownloadFileAsync(int fileId)
Parameters
Returns
GetFileAsync(int)
Get one File
Task<File> GetFileAsync(int fileId)
Parameters
fileId
int
Returns
GetFileAsync(int, string)
Task<File> GetFileAsync(int folderId, string name)
Parameters
Returns
GetFilesAsync(int)
Get all Files in the specified Folder
Task<List<File>> GetFilesAsync(int folderId)
Parameters
folderId
intThe folder ID
Returns
GetFilesAsync(int, string)
Task<List<File>> GetFilesAsync(int siteId, string folderPath)
Parameters
siteId
intReference to the Site
folderPath
stringPath of the folder TODO: todoc verify exactly from where the folder path must start
Returns
GetFilesAsync(string)
Get all Files in the specified folder.
Task<List<File>> GetFilesAsync(string folder)
Parameters
folder
stringThe folder path relative to where the files are stored. TODO: todoc verify exactly from where the folder path must start
Returns
UnzipFileAsync(int)
Task UnzipFileAsync(int fileId)
Parameters
fileId
int
Returns
UpdateFileAsync(File)
Update a File record. Use this for rename a file or change some attributes. This does not contain the file contents.
Task<File> UpdateFileAsync(File file)
Parameters
file
File
Returns
UploadFileAsync(string, int, string)
Upload a file from a URL to a Folder
Task<File> UploadFileAsync(string url, int folderId, string name)