Module erlfs_fs

ERLFS file interaction library.

Copyright © 2008 Jacob Torrey

Authors: Jacob Torrey (torreyji@clarkson.edu).

Description

ERLFS file interaction library

Function Index

create/5Creates a file.
delete/1Deletes the file FID.
file_size/1Returns the filesize of Fid.
get_dir/0Returns the fsdir.
get_filesystem_size/0Returns the used size of the filesystem.
get_max_size/0Get the max allowed size for this node's filesystem.
get_new_fid/0returns a unique FID.
read_file/1Reads in an entire file, outputs as a binary.
replicate/1Replicates the file FID to the local disk.
write_file/2Writes a binary Bin to file Fid.

Function Details

create/5

create(FilenameDir::atom(), Mode::int(), Owner::atom(), Group::atom(), Data::binary()) -> {atomic, ok} | {error, Reason}

Creates a file

delete/1

delete(Fid::int) -> ok | {error, Reason}

Deletes the file FID

file_size/1

file_size(Fid::int()) -> int()

Returns the filesize of Fid

get_dir/0

get_dir() -> atom()

Returns the fsdir

get_filesystem_size/0

get_filesystem_size() -> int()

Returns the used size of the filesystem

get_max_size/0

get_max_size() -> int()

Get the max allowed size for this node's filesystem

get_new_fid/0

get_new_fid() -> int()

returns a unique FID

read_file/1

read_file(Fid::int()) -> binary()

Reads in an entire file, outputs as a binary

replicate/1

replicate(Fid::int()) -> {atomic, ok} | {error, Reason}

Replicates the file FID to the local disk

write_file/2

write_file(Fid::int(), Bin::binary()) -> ok | {error, Reason}

Writes a binary Bin to file Fid


Generated by EDoc, Mar 17 2008, 11:36:20.