Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

IRoxyFilemanService.cs

using Microsoft.AspNetCore.Http;

namespace Nop.Services.Media.RoxyFileman;

/// 
/// RoxyFileman service interface
/// 
public partial interface IRoxyFilemanService
{
    #region Configuration

    /// 
    /// Initial service configuration
    /// 
    /// The base path for the current request
    /// A task that represents the asynchronous operation
    Task ConfigureAsync(string pathBase);

    #endregion

    #region Directories

    /// 
    /// Copy the directory
    /// 
    /// Path to the source directory
    /// Path to the destination directory
    void CopyDirectory(string sourcePath, string destinationPath);

    /// 
    /// Create the new directory
    /// 
    /// Path to the parent directory
    /// Name of the new directory
    void CreateDirectory(string parentDirectoryPath, string name);

    /// 
    /// Delete the directory
    /// 
    /// Path to the directory
    void DeleteDirectory(string path);

    /// 
    /// Download the directory from the server as a zip archive
    /// 
    /// Path to the directory
    byte[] DownloadDirectory(string path);

    /// 
    /// Get all available directories as a directory tree
    /// 
    /// Type of the file
    /// List of directories
    IEnumerable GetDirectoryList(string type);

    /// 
    /// Move the directory
    /// 
    /// Path to the source directory
    /// Path to the destination directory
    void MoveDirectory(string sourcePath, string destinationPath);

    /// 
    /// Rename the directory
    /// 
    /// Path to the source directory
    /// New name of the directory
    void RenameDirectory(string sourcePath, string newName);

    #endregion

    #region Files

    /// 
    /// Get filename and read-only content stream
    /// 
    /// Path to the file
    (Stream stream, string name) GetFileStream(string path);

    /// 
    /// Copy the file
    /// 
    /// Path to the source file
    /// Path to the destination file
    void CopyFile(string sourcePath, string destinationPath);

    /// 
    /// Get binary image thumbnail data
    /// 
    /// Path to the image
    /// The resulting MIME type
    byte[] CreateImageThumbnail(string path, string contentType);

    /// 
    /// Delete the file
    /// 
    /// Path to the file
    void DeleteFile(string path);

    /// 
    /// Get files in the passed directory
    /// 
    /// Path to the files directory
    /// Type of the files
    IEnumerable GetFiles(string directoryPath, string type);

    /// 
    /// Move the file
    /// 
    /// Path to the source file
    /// Path to the destination file
    void MoveFile(string sourcePath, string destinationPath);

    /// 
    /// Rename the file
    /// 
    /// Path to the source file
    /// New name of the file
    void RenameFile(string sourcePath, string newName);

    /// 
    /// Upload files to a directory on passed path
    /// 
    /// Path to directory to upload files
    /// Files sent with the HttpRequest
    /// A task that represents the asynchronous operation
    Task UploadFilesAsync(string directoryPath, IEnumerable files);

    #endregion
}