Hub JS Package

Hub JS Package

  • Users
  • Buckets
  • Threads
  • Textile Docs

›Buckets

Buckets

  • Buckets.copyAuth() method
  • Buckets.withUserAuth() method
  • Buckets.withKeyInfo() method
  • Buckets.getToken() method
  • Buckets.getTokenChallenge() method
  • Buckets.setToken() method
  • Buckets.withThread() method
  • Buckets.getOrCreate() method
  • Buckets.create() method
  • Buckets.existing() method
  • Buckets.root() method
  • Buckets.links() method
  • Buckets.list() method
  • Buckets.listPath() method
  • Buckets.listPathFlat() method
  • Buckets.listIpfsPath() method
  • Buckets.movePath() method
  • Buckets.open() method
  • Buckets.pushPath() method
  • Buckets.pushPaths() method
  • Buckets.pushPathAccessRoles() method
  • Buckets.pullPath() method
  • Buckets.pullPathAccessRoles() method
  • Buckets.pullIpfsPath() method
  • Buckets.remove() method
  • Buckets.removePath() method
  • Buckets.setPath() method

Experimental

  • Archive interface
  • ArchiveDealInfo interface
  • ArchiveStatus enum

Types

  • GetOrCreateOptions interface
  • GetOrCreateResponse interface
  • CreateOptions interface
  • CreateResponse interface
  • Links interface
  • Path interface
  • PathAccessRole enum
  • PathItem interface
  • Root interface
  • BuckMetadata interface

@textile/hub > Buckets > pullIpfsPath

Buckets.pullIpfsPath() method

pullIpfsPath pulls the path from a remote UnixFS dag, writing it to writer if it's a file.

Signature:

pullIpfsPath(path: string, options?: {
        progress?: (num?: number) => void;
    }): AsyncIterableIterator<Uint8Array>;

Parameters

ParameterTypeDescription
pathstringA file/object (sub)-path within a bucket.
options{ progress?: (num?: number) => void; }

Returns:

AsyncIterableIterator<Uint8Array>

Example

Pull a file by its IPFS path and console.log the progress.

import { Buckets } from '@textile/hub'

const pullFile = async (buckets: Buckets, path: string) => {
   const display = (num?: number) => {
     console.log('Progress:', num)
   }
   buckets.pullIpfsPath(path, {progress: display})
}

← Buckets.pullPathAccessRoles() methodBuckets.remove() method →
  • Buckets.pullIpfsPath() method
  • Parameters
  • Example
Hub JS Package
Docs
Getting StartedThreadDBBuckets
Resources
All DocumentationProject SlackBlog
More
GitHubStar
Follow @textileio