Webiant Logo Webiant Logo
  1. No results found.

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

IRoxyFilemanFileProvider.cs

using Microsoft.Extensions.FileProviders;

namespace Nop.Services.Media.RoxyFileman;

/// 
/// Represents provider interface for managing uploaded files
/// 
public partial interface IRoxyFilemanFileProvider : IFileProvider
{
    /// 
    /// Create configuration file for RoxyFileman
    /// 
    /// 
    /// 
    /// A task that represents the asynchronous operation
    Task GetOrCreateConfigurationAsync(string pathBase, string lang);

    /// 
    /// Copy the directory with the embedded files and directories
    /// 
    /// Path to the source directory
    /// Path to the destination directory
    void CopyDirectory(string sourcePath, string destinationPath);

    /// 
    /// Get all available directories as a directory tree
    /// 
    /// Type of the file
    /// A value indicating whether to return a directory tree recursively
    /// Path to start directory
    IEnumerable GetDirectories(string type, bool isRecursive = true, string rootDirectoryPath = "");

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

    /// 
    /// Moves a file or a directory and its contents to a new location
    /// 
    /// The path of the file or directory to move
    /// 
    /// The path to the new location for sourceDirName. If sourceDirName is a file, then destDirName
    /// must also be a file name
    /// 
    void DirectoryMove(string sourceDirName, string destDirName);

    /// 
    /// Moves a specified file to a new location, providing the option to specify a new file name
    /// 
    /// The name of the file to move. Can include a relative or absolute path
    /// The new path and name for the file
    void FileMove(string sourcePath, string destinationPath);

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

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

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

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

    /// 
    /// Save file in the root directory for this instance
    /// 
    /// Directory path in the root
    /// The file name and extension
    /// Mime type
    /// The stream to read
    /// A task that represents the asynchronous operation
    Task SaveFileAsync(string directoryPath, string fileName, string contentType, Stream fileStream);

    /// 
    /// 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);

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

    /// 
    /// Create a zip archive of the specified directory.
    /// 
    /// The directory path with files to compress
    /// The byte array
    byte[] CreateZipArchiveFromDirectory(string path);
}