using Oqtane.Models; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Oqtane.Services { /// /// Service to get / create / upload / download files. /// public interface IFileService { /// /// Get all s in the specified Folder /// /// The folder ID /// Task> GetFilesAsync(int folderId); /// /// Get all s in the specified folder. /// /// /// The folder path relative to where the files are stored. /// TODO: todoc verify exactly from where the folder path must start /// /// Task> GetFilesAsync(string folder); /// /// Get one /// /// /// Task GetFileAsync(int fileId); /// /// Get a based on the and file name. /// /// Reference to the /// name of the file /// /// Task GetFileAsync(int folderId, string name); /// /// Add / store a record. /// This does not contain the file contents. /// /// /// Task AddFileAsync(File file); /// /// Update a record. /// Use this for rename a file or change some attributes. /// This does not contain the file contents. /// /// /// Task UpdateFileAsync(File file); /// /// Delete a /// /// /// Task DeleteFileAsync(int fileId); /// /// Upload a file from a URL to a /// /// /// /// /// Task UploadFileAsync(string url, int folderId, string name); /// /// Get / download a file (the body). /// /// Reference to a /// The bytes of the file Task DownloadFileAsync(int fileId); /// /// Retrieve a list of files from a and /// /// Reference to the /// Path of the folder /// TODO: todoc verify exactly from where the folder path must start /// /// Task> GetFilesAsync(int siteId, string folderPath); /// /// Unzips the contents of a zip file /// /// Reference to the /// /// Task UnzipFileAsync(int fileId); } }