You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 29, 2020. It is now read-only.
The `import`object is a duplex pull stream that takes objects of the form:
106
+
The `import`function returns an async iterator takes a source async iterator that yields objects of the form:
109
107
110
108
```js
111
109
{
112
110
path:'a name',
113
-
content: (Buffer, pull-stream emitting Buffers or a Readable stream)
111
+
content: (Bufferor iterator emitting Buffers)
114
112
}
115
113
```
116
114
117
115
`import` will output file info objects as files get stored in IPFS. When stats on a node are emitted they are guaranteed to have been written.
118
116
119
-
`dag` is an instance of the [`IPLD Resolver`](https://github.com/ipld/js-ipld-resolver) or the [`js-ipfs``dag api`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)
117
+
`ipld` is an instance of the [`IPLD Resolver`](https://github.com/ipld/js-ipld-resolver) or the [`js-ipfs``dag api`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)
120
118
121
119
The input's file paths and directory structure will be preserved in the [`dag-pb`](https://github.com/ipld/js-ipld-dag-pb) created nodes.
122
120
@@ -148,10 +146,8 @@ The input's file paths and directory structure will be preserved in the [`dag-pb
148
146
-`rawLeaves` (boolean, defaults to false): When a file would span multiple DAGNodes, if this is true the leaf nodes will not be wrapped in `UnixFS` protobufs and will instead contain the raw file bytes
149
147
-`leafType` (string, defaults to `'file'`) what type of UnixFS node leaves should be - can be `'file'` or `'raw'` (ignored when `rawLeaves` is `true`)
0 commit comments