Module luwak_file

Function Index

create/3Create a luwak file handle with the given name and attributes.
create/4Create a luwak file handle with the given name and attributes.
delete/2deletes the named file from luwak.
exists/2Checks for the existence of the named file.
get/2returns a filehandle for the named file.
get_attributes/1Gets the attribute dictionary from the file handle.
get_property/2retrieves the named property from the filehandle.
length/2returns the length in bytes of the file.
name/1returns the name of the given file handle.
set_attributes/3Sets the new attributes, saves them, and returns a new file handle.

Function Details

create/3

create(Riak::riak(), Name::binary(), Attributes::dict()) -> {ok, File::luwak_file()}

Equivalent to create(Riak, Name, [], Attributes).

Create a luwak file handle with the given name and attributes. Will overwrite an existing file of the same name.

create/4

create(Riak::riak(), Name::binary(), Properties::proplist(), Attributes::dict()) -> {ok, File::luwak_file()}

Create a luwak file handle with the given name and attributes. Recognized properties: {block_size, int()} - The maximum size of an individual data chunk in bytes. Default is 1000000. {tree_order, int()} - The maximum number of children for an individual tree node. Default is 250.

delete/2

delete(Riak::riak(), Name::binary()) -> ok | {error, Reason}

deletes the named file from luwak. This is a fast operation since the blocks and tree for that file remain untouched. A GC operation (not yet implemented) will be required to clean them up properly.

exists/2

exists(Riak::riak(), Name::binary()) -> {ok, true} | {ok, false} | {error, Reason}

Checks for the existence of the named file.

get/2

get(Riak::riak(), Name::binary()) -> {ok, File} | {error, Reason}

returns a filehandle for the named file.

get_attributes/1

get_attributes(Obj::luwak_file()) -> dict()

Gets the attribute dictionary from the file handle.

get_property/2

get_property(Obj::luwak_file(), PropName::atom()) -> Property

retrieves the named property from the filehandle.

length/2

length(Riak::riak(), File::luwak_file()) -> Length

returns the length in bytes of the file.

name/1

name(Obj::luwak_file()) -> binary()

returns the name of the given file handle.

set_attributes/3

set_attributes(Riak::riak(), Obj::luwak_file(), Attributes::dict()) -> {ok, NewFile}

Sets the new attributes, saves them, and returns a new file handle.


Generated by EDoc, May 31 2010, 11:13:39.