import { importDirectory } from 'ipfs-unixfs-importer'
import { MemoryBlockstore } from 'blockstore-core'
// store blocks in memory, other blockstores are available
const blockstore = new MemoryBlockstore()
const input: DirectoryCandidate = {
path: './foo.txt'
}
const entry = await importDirectory(input, blockstore)
importDiris similar toimporterexcept it accepts a singleDirectoryCandidateand returns a promise of a singleImportResultinstead of a stream of results.