|
| 1 | +# ipfs-unixfs JavaScript Implementation <!-- omit in toc --> |
| 2 | + |
| 3 | +[](http://ipn.io) |
| 4 | +[](http://ipfs.io/) |
| 5 | +[](http://webchat.freenode.net/?channels=%23ipfs) |
| 6 | +[](https://travis-ci.com/ipfs/js-ipfs-unixfs) |
| 7 | +[](https://codecov.io/gh/ipfs/js-ipfs-unixfs) |
| 8 | +[](https://david-dm.org/ipfs/js-ipfs-unixfs) |
| 9 | +[](https://github.com/feross/standard) |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +> JavaScript implementation of IPFS' UnixFS (a Unix FileSystem files representation on top of a MerkleDAG) |
| 14 | +
|
| 15 | +The UnixFS spec can be found inside the [ipfs/specs repository](http://github.com/ipfs/specs) |
| 16 | + |
| 17 | +## Lead Maintainer <!-- omit in toc --> |
| 18 | + |
| 19 | +[Alex Potsides](https://github.com/achingbrain) |
| 20 | + |
| 21 | +## Table of Contents <!-- omit in toc --> |
| 22 | + |
| 23 | +- [Install](#install) |
| 24 | + - [npm](#npm) |
| 25 | + - [Use in Node.js](#use-in-nodejs) |
| 26 | + - [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler) |
| 27 | + - [Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag) |
| 28 | +- [Usage](#usage) |
| 29 | + - [Examples](#examples) |
| 30 | + - [Create a file composed by several blocks](#create-a-file-composed-by-several-blocks) |
| 31 | + - [Create a directory that contains several files](#create-a-directory-that-contains-several-files) |
| 32 | +- [API](#api) |
| 33 | + - [UnixFS Data Structure](#unixfs-data-structure) |
| 34 | + - [create an unixfs Data element](#create-an-unixfs-data-element) |
| 35 | + - [add and remove a block size to the block size list](#add-and-remove-a-block-size-to-the-block-size-list) |
| 36 | + - [get total fileSize](#get-total-filesize) |
| 37 | + - [marshal and unmarshal](#marshal-and-unmarshal) |
| 38 | + - [is this UnixFS entry a directory?](#is-this-unixfs-entry-a-directory) |
| 39 | + - [has an mtime been set?](#has-an-mtime-been-set) |
| 40 | +- [Contribute](#contribute) |
| 41 | +- [License](#license) |
| 42 | + |
| 43 | +## Structure |
| 44 | + |
| 45 | +* `/packages/ipfs-unixfs` Serialization/deserialization of UnixFS objects to protocol buffers |
| 46 | +* `/packages/ipfs-unixfs-importer` Builds DAGs from files and directories |
| 47 | +* `/packages/ipfs-unixfs-exporter` Exports DAGs |
| 48 | + |
| 49 | +## Contribute |
| 50 | + |
| 51 | +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs/issues)! |
| 52 | + |
| 53 | +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). |
| 54 | + |
| 55 | +[](https://github.com/ipfs/community/blob/master/contributing.md) |
| 56 | + |
| 57 | +## License |
| 58 | + |
| 59 | +[MIT](LICENSE) |
0 commit comments