Copyright © (C) 2011, Erlware LLC
file_info() = mode | time | owner | group
option() = recursive | {file_info, [file_info()]}
| copy/2 | copy a file including timestamps,ownership and mode etc. |
| copy/3 | copy an entire directory to another location. |
| copy_file_info/3 | |
| exists/1 | |
| find/2 | Finds files and directories that match the regexp supplied in the TargetPattern regexp. |
| insecure_mkdtemp/0 | make a unique temporary directory. |
| is_dir/1 | |
| is_symlink/1 | indicates with a boolean if the path supplied refers to symlink. |
| md5sum/1 | return the MD5 digest of a string or a binary, named after the UNIX utility. |
| mkdir_p/1 | Makes a directory including parent dirs if they are missing. |
| mkdir_path/1 | Makes a directory including parent dirs if they are missing. |
| read/1 | read a file from the file system. |
| real_dir_path/1 | gets the real path of a directory. |
| remove/1 | delete a file. |
| remove/2 | delete a file. |
| sha1sum/1 | return the SHA-1 digest of a string or a binary, named after the UNIX utility. |
| type/1 | returns the type of the file. |
| write/2 | write a file to the file system. |
| write_term/2 | write a term out to a file so that it can be consulted later. |
copy(From::file:filename(), To::file:filename()) -> ok | {error, Reason::term()}
copy a file including timestamps,ownership and mode etc.
copy(From::file:name(), To::file:name(), Options::[option()]) -> ok | {error, Reason::term()}
copy an entire directory to another location.
copy_file_info(To, From, FileInfoToKeep) -> any()
exists(Filename::file:filename()) -> boolean()
find(FromDir::file:name(), TargetPattern::string()) -> [file:name()]
Finds files and directories that match the regexp supplied in the TargetPattern regexp.
insecure_mkdtemp() -> TmpDirPath::file:name() | {error, term()}
make a unique temporary directory. Similar function to BSD stdlib function of the same name.
is_dir(Path) -> any()
is_symlink(Path::file:name()) -> boolean()
indicates with a boolean if the path supplied refers to symlink.
md5sum(Value::string() | binary()) -> string()
return the MD5 digest of a string or a binary, named after the UNIX utility.
mkdir_p(Path::file:name()) -> ok | {error, Reason::term()}
Makes a directory including parent dirs if they are missing.
mkdir_path(Path::file:name()) -> ok | {error, Reason::term()}
Makes a directory including parent dirs if they are missing.
read(FilePath::file:filename()) -> {ok, binary()} | {error, Reason::term()}
read a file from the file system. Provide UEX exception on failure.
real_dir_path(Path::file:name()) -> file:name()
gets the real path of a directory. This is mostly useful for resolving symlinks. Be aware that this temporarily changes the current working directory to figure out what the actual path is. That means that it can be quite slow.
remove(Path::file:name()) -> ok | {error, Reason::term()}
delete a file.
remove(Path::file:name(), Options::[option()]) -> ok | {error, Reason::term()}
delete a file. Use the recursive option for directories.
Example: remove("./tmp_dir", [recursive]).
sha1sum(Value::string() | binary()) -> string()
return the SHA-1 digest of a string or a binary, named after the UNIX utility.
type(Path::file:name()) -> file | symlink | directory | undefined
returns the type of the file.
write(FileName::file:filename(), Contents::string()) -> ok | {error, Reason::term()}
write a file to the file system. Provide UEX exception on failure.
write_term(FileName::file:filename(), Term::term()) -> ok | {error, Reason::term()}
write a term out to a file so that it can be consulted later.
Generated by EDoc