UNPKG

ipfs-unixfs-importer

Version:

JavaScript implementation of the UnixFs importer used by IPFS

22 lines 994 B
import { Dir, DirProps } from './dir.js'; import { PersistOptions } from './utils/persist.js'; import { Bucket, BucketChild } from 'hamt-sharding'; import type { ImportResult, InProgressImportResult } from './index.js'; import type { Blockstore } from 'interface-blockstore'; declare class DirSharded extends Dir { private readonly _bucket; constructor(props: DirProps, options: PersistOptions); put(name: string, value: InProgressImportResult | Dir): Promise<void>; get(name: string): Promise<InProgressImportResult | Dir | undefined>; childCount(): number; directChildrenCount(): number; onlyChild(): Bucket<InProgressImportResult | Dir> | BucketChild<InProgressImportResult | Dir>; eachChildSeries(): AsyncGenerator<{ key: string; child: InProgressImportResult | Dir; }>; estimateNodeSize(): number; flush(blockstore: Blockstore): AsyncGenerator<ImportResult>; } export default DirSharded; //# sourceMappingURL=dir-sharded.d.ts.map