• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IFileSource

    Represents a file source, ie a mean for a target environment involved in a deployment to obtain the content of files being deployed.

    Namespace: Umbraco.Cms.Core.Deploy
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IFileSource

    Methods

    View Source

    GetFileContent(StringUdi)

    Gets the content of a file as a string.

    Declaration
    string GetFileContent(StringUdi udi)
    Parameters
    Type Name Description
    StringUdi udi

    A file entity identifier.

    Returns
    Type Description
    System.String

    A string containing the file content.

    Remarks

    Returns null if no content could be read.

    View Source

    GetFileContentAsync(StringUdi, CancellationToken)

    Gets the content of a file as a string.

    Declaration
    Task<string> GetFileContentAsync(StringUdi udi, CancellationToken token)
    Parameters
    Type Name Description
    StringUdi udi

    A file entity identifier.

    CancellationToken token

    A cancellation token.

    Returns
    Type Description
    Task<System.String>

    A string containing the file content.

    Remarks

    Returns null if no content could be read.

    View Source

    GetFileLength(StringUdi)

    Gets the length of a file.

    Declaration
    long GetFileLength(StringUdi udi)
    Parameters
    Type Name Description
    StringUdi udi

    A file entity identifier.

    Returns
    Type Description
    System.Int64

    The length of the file, or -1 if the file does not exist.

    View Source

    GetFileLengthAsync(StringUdi, CancellationToken)

    Gets the length of a file.

    Declaration
    Task<long> GetFileLengthAsync(StringUdi udi, CancellationToken token)
    Parameters
    Type Name Description
    StringUdi udi

    A file entity identifier.

    CancellationToken token

    A cancellation token.

    Returns
    Type Description
    Task<System.Int64>

    The length of the file, or -1 if the file does not exist.

    View Source

    GetFiles(IEnumerable<StringUdi>, IFileTypeCollection)

    Gets files and store them using a file store.

    Declaration
    void GetFiles(IEnumerable<StringUdi> udis, IFileTypeCollection fileTypes)
    Parameters
    Type Name Description
    IEnumerable<StringUdi> udis

    The udis of the files to get.

    IFileTypeCollection fileTypes

    A collection of file types which can store the files.

    View Source

    GetFilesAsync(IEnumerable<StringUdi>, IFileTypeCollection, CancellationToken)

    Gets files and store them using a file store.

    Declaration
    Task GetFilesAsync(IEnumerable<StringUdi> udis, IFileTypeCollection fileTypes, CancellationToken token)
    Parameters
    Type Name Description
    IEnumerable<StringUdi> udis

    The udis of the files to get.

    IFileTypeCollection fileTypes

    A collection of file types which can store the files.

    CancellationToken token

    A cancellation token.

    Returns
    Type Description
    Task
    View Source

    GetFileStream(StringUdi)

    Gets the content of a file as a stream.

    Declaration
    Stream GetFileStream(StringUdi udi)
    Parameters
    Type Name Description
    StringUdi udi

    A file entity identifier.

    Returns
    Type Description
    Stream

    A stream with read access to the file content.

    Remarks

    Returns null if no content could be read.

    The caller should ensure that the stream is properly closed/disposed.

    View Source

    GetFileStreamAsync(StringUdi, CancellationToken)

    Gets the content of a file as a stream.

    Declaration
    Task<Stream> GetFileStreamAsync(StringUdi udi, CancellationToken token)
    Parameters
    Type Name Description
    StringUdi udi

    A file entity identifier.

    CancellationToken token

    A cancellation token.

    Returns
    Type Description
    Task<Stream>

    A stream with read access to the file content.

    Remarks

    Returns null if no content could be read.

    The caller should ensure that the stream is properly closed/disposed.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetFileContent(StringUdi)
      • GetFileContentAsync(StringUdi, CancellationToken)
      • GetFileLength(StringUdi)
      • GetFileLengthAsync(StringUdi, CancellationToken)
      • GetFiles(IEnumerable<StringUdi>, IFileTypeCollection)
      • GetFilesAsync(IEnumerable<StringUdi>, IFileTypeCollection, CancellationToken)
      • GetFileStream(StringUdi)
      • GetFileStreamAsync(StringUdi, CancellationToken)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX