1
1
IPFS unixFS Engine
2
2
===================
3
3
4
- > Import & Export data to/from an [ IPFS DAG Service] [ ]
4
+ > Import & Export data to/from an IPFS [ DAG Service] [ ]
5
5
6
6
[ ![ ] ( https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square )] ( http://ipn.io )
7
7
[ ![ ] ( https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square )] ( http://webchat.freenode.net/?channels=%23ipfs )
@@ -108,9 +108,9 @@ The importer is a object Transform stream that accepts objects of the form
108
108
}
109
109
```
110
110
111
- The stream will output IPFS DAG Node stats for the nodes it as added to the DAG
112
- Service. When stats on a node are emitted they are guaranteed to have been
113
- written into the DAG Service's storage mechanism.
111
+ The stream will output IPFS DAG Node stats for the nodes as they are added to
112
+ the DAG Service. When stats on a node are emitted they are guaranteed to have
113
+ been written into the [ DAG Service] [ ] 's storage mechanism.
114
114
115
115
The input's file paths and directory structure will be preserved in the DAG
116
116
Nodes.
@@ -144,7 +144,12 @@ exportEvent.on('data', (result) => {
144
144
const Exporter = require (' ipfs-unixfs-engine' ).exporter
145
145
```
146
146
147
- The exporter is a readable stream in object mode that outputs objects of the
147
+ ### new Exporter(hash, dagService)
148
+
149
+ Uses the given [ DAG Service] [ ] to fetch an IPFS [ UnixFS] [ ] object(s) by their
150
+ multiaddress.
151
+
152
+ Creates a new readable stream in object mode that outputs objects of the
148
153
form
149
154
150
155
``` js
154
159
}
155
160
```
156
161
157
- by the multihash of the file from the DAG Service.
162
+ Errors are received as with a normal stream, by listening on the ` 'error' ` event
163
+ to be emitted.
158
164
159
165
160
166
## Install
@@ -170,4 +176,6 @@ $ npm install ipfs-unixfs-engine
170
176
ISC
171
177
172
178
173
- [ IPFS DAG Service ] : https://github.com/vijayee/js-ipfs-merkle-dag/
179
+ [ DAG Service ] : https://github.com/vijayee/js-ipfs-merkle-dag/
180
+ [ UnixFS ] : https://github.com/ipfs/specs/tree/master/unixfs
181
+
0 commit comments