Module setup_file

Function Index

close/1
consult/1Like file:consult/1, but supports paths into zip and escript archives.
consult_binary/1Like file:consult/1, but operates directly on a binary.
eval_binary/1Like file:script/1, but operates directly on a binary.
eval_binary/2Like file:script/2, but operates directly on a binary.
list_dir/1Like file:list_dir/1, but supports paths into zip and escript archives.
open/2
read_file/1Like file:read_file/1, but supports paths into zip and escript archives.
script/1Like file:script/1, but supports paths into zip and escript archives.
script/2Like file:script/2, but supports paths into zip and escript archives.

Function Details

close/1

close(Fd) -> any()

consult/1

consult(Filename) -> {ok, Terms} | {error, Reason}

Like file:consult/1, but supports paths into zip and escript archives

This function works like file:consult/1 on normal paths, but instead of failing on paths that lead into archives, it does a fair job of entering the archive and producing a result.

consult_binary/1

consult_binary(Bin) -> any()

Like file:consult/1, but operates directly on a binary.

This function works as if file:consult(F) -> {ok,Bin} = file:read_file(F), consult_binary(Bin).

eval_binary/1

eval_binary(Bin) -> any()

Like file:script/1, but operates directly on a binary.

This function works as if file:script(F) -> {ok,Bin} = file:read_file(F), eval_binary(Bin).

eval_binary/2

eval_binary(Bin, Bindings) -> any()

Like file:script/2, but operates directly on a binary.

This function works as if file:script(F, Bs) -> {ok,Bin} = file:read_file(F), eval_binary(Bin, Bs).

list_dir/1

list_dir(Dir) -> {ok, Filenames} | {error, Reason}

Like file:list_dir/1, but supports paths into zip and escript archives

This function works like file:list_dir/1 on normal paths, but instead of failing on paths that lead into archives, it does a fair job of entering the archive and producing a result.

open/2

open(File, Opts) -> any()

read_file/1

read_file(Filename) -> {ok, Binary} | {error, Reason}

Like file:read_file/1, but supports paths into zip and escript archives

This function works like file:read_file/1 on normal paths, but instead of failing on paths that lead into archives, it does a fair job of entering the archive and producing a result.

script/1

script(Filename) -> {ok, Value} | {error, Reason}

Like file:script/1, but supports paths into zip and escript archives

This function works like file:script/1 on normal paths, but instead of failing on paths that lead into archives, it does a fair job of entering the archive and producing a result.

script/2

script(Filename, Bindings) -> {ok, Value} | {error, Reason}

Like file:script/2, but supports paths into zip and escript archives

This function works like file:script/2 on normal paths, but instead of failing on paths that lead into archives, it does a fair job of entering the archive and producing a result.


Generated by EDoc