using Oqtane.Models;
using System.Collections.Generic;
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);
///
/// 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);
///
/// Upload one or more files.
///
/// Target
/// The files to upload, serialized as a string.
/// A task-identifier, to ensure communication about this upload.
///
Task UploadFilesAsync(int folderId, string[] files, string fileUploadName);
///
/// Upload one or more files.
///
/// Target
/// TODO: todoc verify exactly from where the folder path must start
///
/// The files to upload, serialized as a string.
/// A task-identifier, to ensure communication about this upload.
///
Task UploadFilesAsync(string folder, string[] files, string fileUploadName);
///
/// 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);
}
}