IpfsMfsProviderDriver is the driver for the IPFS MFS provider.

Hierarchy

  • IpfsMfsProviderDriver

Implements

Constructors

Properties

Methods

Constructors

Properties

client: IPFSHTTPClient
host: any

Methods

  • Creates a directory

    Returns

    Returns true if the directory created, else false

    Parameters

    • name: string

      directory name

    • mount: Mount

      mount to check

    Returns Promise<boolean>

  • Delete a file or directory

    Returns

    Returns true if the file or directory was deleted, else false

    Parameters

    • filePath: string

      name of the file or directory

    • mount: Mount

      mount point

    Returns Promise<boolean>

  • Download a file

    Returns

    Parameters

    • id: string

      id of the file

    • mount: Mount

      mount to download the file from

    • options: {} = {}

      options

      Returns Promise<any>

    • Verify if a file exists

      Returns

      Returns true if the file exists, else false

      Parameters

      • path: string

        path to the file

      • mount: Mount

        mount to check

      Returns Promise<boolean>

    • Upload a file

      Parameters

      • file: File

        file to upload

      • mount: Mount

        mount to upload to

      • options: {} = {}

        options

        Returns Promise<any>

      Generated using TypeDoc