Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IFileRepository

    Represents a repository for file operations.

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IFileRepository

    Methods

    View Source

    GetFileContentStream(string)

    Gets a stream for reading the content of a file.

    Declaration
    Stream GetFileContentStream(string filepath)
    Parameters
    Type Name Description
    string filepath

    The path to the file.

    Returns
    Type Description
    Stream

    A stream for reading the file content.

    View Source

    GetFileSize(string)

    Gets the size of a file in bytes.

    Declaration
    long GetFileSize(string filepath)
    Parameters
    Type Name Description
    string filepath

    The path to the file.

    Returns
    Type Description
    long

    The size of the file in bytes.

    View Source

    SetFileContent(string, Stream)

    Sets the content of a file.

    Declaration
    void SetFileContent(string filepath, Stream content)
    Parameters
    Type Name Description
    string filepath

    The path to the file.

    Stream content

    The stream containing the content to write.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX