ipfs-unixfs-importer
Version:
JavaScript implementation of the UnixFs importer used by IPFS
25 lines • 1.1 kB
TypeScript
import { Bucket, type BucketChild } from 'hamt-sharding';
import { Dir, type DirProps } from './dir.js';
import { type PersistOptions } from './utils/persist.js';
import type { ImportResult, InProgressImportResult } from './index.js';
import type { Blockstore } from 'interface-blockstore';
export interface DirShardedOptions extends PersistOptions {
shardFanoutBits: number;
}
declare class DirSharded extends Dir {
private readonly _bucket;
constructor(props: DirProps, options: DirShardedOptions);
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