Search Results for

    Show / Hide Table of Contents

    Interface IStorageService

    Defines the contract for file storage operations in the OEMS system.

    Namespace: OEMS.Core.Application.ApplicationServiceInterfaces
    Assembly: OEMS.Core.dll
    Syntax
    public interface IStorageService

    Methods

    DeleteFileAsync(string)

    Deletes a file from the storage system.

    Declaration
    Task DeleteFileAsync(string path)
    Parameters
    Type Name Description
    string path

    The path of the file to delete.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    GetPublicUrl(string)

    Gets the public URL for a file in the storage system.

    Declaration
    Task<string> GetPublicUrl(string path)
    Parameters
    Type Name Description
    string path

    The path of the file to get the public URL for.

    Returns
    Type Description
    Task<string>

    A task that represents the asynchronous operation. The task result contains the public URL of the file.

    LoadFileAsync(string)

    Loads a file from the storage system.

    Declaration
    Task<byte[]> LoadFileAsync(string path)
    Parameters
    Type Name Description
    string path

    The path of the file to load.

    Returns
    Type Description
    Task<byte[]>

    A task that represents the asynchronous operation. The task result contains the file content as a byte array.

    SaveFileAsync(Stream, string)

    Saves a file to the storage system.

    Declaration
    Task<string> SaveFileAsync(Stream fileStream, string fileName)
    Parameters
    Type Name Description
    Stream fileStream

    The file stream to save.

    string fileName

    The name of the file to save.

    Returns
    Type Description
    Task<string>

    A task that represents the asynchronous operation. The task result contains the path where the file was saved.

    In this article
    Back to top Generated by DocFX