Open
Description
When using a wrapWithDirectory: false
, nothing will be yielded from the unixfs importer when providing an empty import candidate. However, when wrapWithDirectory: true
the empty directory is returned.
Is this the expected behaviour?
import normalizeAddInput from 'ipfs-core-utils/src/files/normalise-input/index.js'
import { importer } from 'ipfs-unixfs-importer'
const input = []
const rootEntry = await last(pipe(
normalizeAddInput(input),
(source: any) => importer(source, blockstore, {
cidVersion: 1,
chunker: 'fixed',
maxChunkSize: 262144,
hasher: sha256,
rawLeaves: true,
wrapWithDirectory: true
})
))