@@ -6,7 +6,7 @@ import { unixfs, UnixFS } from '../src/index.js'
6
6
import { MemoryBlockstore } from 'blockstore-core'
7
7
import type { CID } from 'multiformats/cid'
8
8
import * as dagPb from '@ipld/dag-pb'
9
- import { importContent , importBytes } from 'ipfs-unixfs-importer'
9
+ import { importDirectory , importBytes , importFile } from 'ipfs-unixfs-importer'
10
10
import { createShardedDirectory } from './fixtures/create-sharded-directory.js'
11
11
12
12
const smallFile = Uint8Array . from ( new Array ( 13 ) . fill ( 0 ) . map ( ( ) => Math . random ( ) * 100 ) )
@@ -24,7 +24,7 @@ describe('stat', function () {
24
24
25
25
fs = unixfs ( { blockstore } )
26
26
27
- const imported = await importContent ( { path : 'empty' } , blockstore )
27
+ const imported = await importDirectory ( { path : 'empty' } , blockstore )
28
28
emptyDirCid = imported . cid
29
29
} )
30
30
@@ -100,7 +100,7 @@ describe('stat', function () {
100
100
101
101
it ( 'should stat file with mode' , async ( ) => {
102
102
const mode = 0o644
103
- const { cid } = await importContent ( {
103
+ const { cid } = await importFile ( {
104
104
content : smallFile ,
105
105
mode
106
106
} , blockstore )
@@ -115,7 +115,7 @@ describe('stat', function () {
115
115
secs : 5n ,
116
116
nsecs : 0
117
117
}
118
- const { cid } = await importContent ( {
118
+ const { cid } = await importFile ( {
119
119
content : smallFile ,
120
120
mtime
121
121
} , blockstore )
0 commit comments