HashFS v0.4.0 HashFS

HashFS is a small library providing a content-addressable file system. This is the documentation generated from the source.

Summary

Functions

Makes the store forget the content at the given address

Test whether the given store has something stored on the given address

Create a new database which will store data on the given path

Get a new File with the contents corresponding to the calculated hash

Same as retrieve/2 but raises an error when something went wrong

Import a file into the repository by giving a reference to its location

Store a file. The file’s content is given by input, which is a Stream, and a length in bytes

Same as store/2, but raises an error when something went wrong

The same as store/3, except that this raises an error when something went wrong

Functions

delete(fs, hash)

Makes the store forget the content at the given address.

has(fs, hash)

Test whether the given store has something stored on the given address.

new(path)

Create a new database which will store data on the given path.

retrieve(fs, hash)

Get a new File with the contents corresponding to the calculated hash.

retrieve!(fs, path)

Same as retrieve/2 but raises an error when something went wrong.

store(fs, path)

Import a file into the repository by giving a reference to its location.

store(fs, input, length)

Store a file. The file’s content is given by input, which is a Stream, and a length in bytes.

store!(fs, path)

Same as store/2, but raises an error when something went wrong.

store!(fs, input, length)

The same as store/3, except that this raises an error when something went wrong.