Show / Hide Table of Contents

    Class DevDfs

    A very naive implementation of the IDfs interface that simply relies on the file system. This can only result in a 'Distributed' file system if the Catalyst.Core.Modules.Dfs.DevDfs._baseFolder happens to be shared network path. Otherwise, this can be used in integration tests, to ensure the tests can be run locally and offline.

    Inheritance
    System.Object
    DevDfs
    Implements
    IDfs
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Catalyst.Core.Modules.Dfs
    Assembly: Catalyst.Core.Modules.Dfs.dll
    Syntax
    public class DevDfs : IDfs
    Remarks

    The hashing algorithm is also a simple one (>) to save time in integration tests

    Constructors

    | Improve this Doc View Source

    DevDfs(IFileSystem, IHashProvider, String)

    Declaration
    public DevDfs(IFileSystem fileSystem, IHashProvider hashProvider, string baseFolder = null)
    Parameters
    Type Name Description
    IFileSystem fileSystem
    IHashProvider hashProvider
    System.String baseFolder

    Methods

    | Improve this Doc View Source

    AddAsync(Stream, String, CancellationToken)

    Declaration
    public Task<Cid> AddAsync(Stream content, string name = "", CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.IO.Stream content
    System.String name
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<Cid>
    | Improve this Doc View Source

    AddTextAsync(String, CancellationToken)

    Declaration
    public Task<Cid> AddTextAsync(string utf8Content, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.String utf8Content
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<Cid>
    | Improve this Doc View Source

    ReadAsync(Cid, CancellationToken)

    Declaration
    public Task<Stream> ReadAsync(Cid cid, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Cid cid
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.IO.Stream>
    | Improve this Doc View Source

    ReadTextAsync(Cid, CancellationToken)

    Declaration
    public Task<string> ReadTextAsync(Cid cid, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Cid cid
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    Implements

    IDfs
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Catalyst Network