@@ -161,9 +161,9 @@ pull(
161
161
162
162
##### ` Go ` ** WIP**
163
163
164
- ##### ` JavaScript ` - ipfs.files.cat(ipfsPath, [ callback] )
164
+ ##### ` JavaScript ` - ipfs.files.cat(ipfsPath, [ begin ] , [ end ] , [ callback] )
165
165
166
- ipfsPath can be of type:
166
+ ` ipfsPath ` can be of type:
167
167
168
168
- [ ` cid ` ] [ cid ] of type:
169
169
- [ Buffer] [ b ] , the raw Buffer of the cid
@@ -173,6 +173,8 @@ ipfsPath can be of type:
173
173
- '/ipfs/QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66/a.txt'
174
174
- 'QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66/a.txt'
175
175
176
+ ` begin ` is an optional byte offset to start the stream at
177
+ ` end ` is an optional byte offset to stop the stream before
176
178
` callback ` must follow ` function (err, file) {} ` signature, where ` err ` is an error if the operation was not successful and ` file ` is a [ Buffer] [ b ]
177
179
178
180
If no ` callback ` is passed, a promise is returned.
@@ -197,9 +199,9 @@ A great source of [examples][] can be found in the tests for this API.
197
199
198
200
##### ` Go ` ** WIP**
199
201
200
- ##### ` JavaScript ` - ipfs.files.catReadableStream(ipfsPath) -> [ Readable Stream] [ rs ]
202
+ ##### ` JavaScript ` - ipfs.files.catReadableStream(ipfsPath, [ begin ] , [ end ] ) -> [ Readable Stream] [ rs ]
201
203
202
- ipfsPath can be of type:
204
+ ` ipfsPath ` can be of type:
203
205
204
206
- [ ` cid ` ] [ cid ] of type:
205
207
- [ Buffer] [ b ] , the raw Buffer of the cid
@@ -209,6 +211,9 @@ ipfsPath can be of type:
209
211
- '/ipfs/QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66/a.txt'
210
212
- 'QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66/a.txt'
211
213
214
+ ` begin ` is an optional byte offset to start the stream at
215
+ ` end ` is an optional byte offset to stop the stream before
216
+
212
217
Returns a [ Readable Stream] [ rs ] with the contents of the file.
213
218
214
219
@@ -225,9 +230,9 @@ A great source of [examples][] can be found in the tests for this API.
225
230
226
231
##### ` Go ` ** WIP**
227
232
228
- ##### ` JavaScript ` - ipfs.files.catPullStream(ipfsPath) -> [ Pull Stream] [ rs ]
233
+ ##### ` JavaScript ` - ipfs.files.catPullStream(ipfsPath, [ begin ] , [ end ] ) -> [ Pull Stream] [ rs ]
229
234
230
- ipfsPath can be of type:
235
+ ` ipfsPath ` can be of type:
231
236
232
237
- [ ` cid ` ] [ cid ] of type:
233
238
- [ Buffer] [ b ] , the raw Buffer of the cid
@@ -237,6 +242,9 @@ ipfsPath can be of type:
237
242
- '/ipfs/QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66/a.txt'
238
243
- 'QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66/a.txt'
239
244
245
+ ` begin ` is an optional byte offset to start the stream at
246
+ ` end ` is an optional byte offset to stop the stream before
247
+
240
248
Returns a [ Pull Stream] [ ps ] with the contents of the file.
241
249
242
250
``` JavaScript
0 commit comments