Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Interface for ipfs.files.cat (and alias ipfs.cat) #21

Merged
merged 1 commit into from
Jun 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,33 @@ ipfs.files.createAddStream(function (err, stream) {




### `cat`

> Streams the file at the given IPFS multihash..

##### `Go` **WIP**

##### `JavaScript` - ipfs.cat(multihash, [callback])

`multihash` is a [multihash][] which can be passed as

- Buffer, the raw Buffer of the multihash
- String, the base58 encoded version of the multihash

`callback` must follow `function (err, stream) {}` signature, where `err` is an error if the operation was not successful and `stream` is a readable stream of the file.

If no `callback` is passed, a promise is returned.

```js
ipfs.files.cat(multihash, function (err, file) {
// file will be a stream containing the data of the file requested
})
```




## Object

### `object.new`
Expand Down
Loading