Copyright © 2010-2012 ALEPH ARCHIVES Ltd. All rights reserved.
Version: 1.0.0
Authors: Aleph Archives Ltd. [web site: http://aleph-archives.com/].
OS independent filesystem layer APIs.
This module provides an asbtract low-level functions to deal with filesystem in a portable way (compression, disk-cache optimization, etc.).
Small subpart of its capabilities is exploited for now (stay tuned).handle() = #wsdk_file{}
delete/1 | Tries to delete the file Filename. |
mktemp/0 | Create a temporary file in the current working directory. |
mktemp/1 | Create a temporary file of "Length" bytes length in the current working directory. |
mktemp/2 | Create a temporary file of "Length" bytes length in the directory "Dir". |
delete(Filename::file:name()) -> ok | {error, term()}
Tries to delete the file Filename. Returns ok if successful.
mktemp() -> file:name()
Create a temporary file in the current working directory.
This file is guaranteed not to exist at the time of function invocation and is suitable for use by the application (race-condition).
This temporary filname is composed of three parts:This schema prevents two (or more) Erlang virtual machines to collide by producing the same temporary filename(s) when running in the same box.
Examples:wsdk_file:mktemp(33)
.
mktemp(Length::non_neg_integer()) -> file:name()
Create a temporary file of "Length" bytes length in the current working directory.
Note: Length should be >= 11, otherwise the call fails.
This is equivalent to call:wsdk_file:mktemp(Length, '.')
.
mktemp(Length::non_neg_integer(), Dir::file:name()) -> file:name()
Create a temporary file of "Length" bytes length in the directory "Dir".
The directory is created if it doesn't exists.
Note: Length should be >= 11, otherwise the call fails.Generated by EDoc, Sep 5 2012, 17:38:09.