From 5a485461a1157fef1bb3ce8426bfd1ad57b5ca52 Mon Sep 17 00:00:00 2001
From: Hans Bolinder
-iodata() = iolist() | binary()
- iolist() = [char() | binary() | iolist()]
-
-io_device()
- as returned by file:open/2, a process handling IO protocols
-
-name() = string() | atom() | DeepList | RawFilename
- DeepList = [char() | atom() | DeepList]
- RawFilename = binary()
- If VM is in unicode filename mode, string() and char() are allowed to be > 255.
- RawFilename is a filename not subject to Unicode translation, meaning that it
- can contain characters not conforming to the Unicode encoding expected from the
- filesystem (i.e. non-UTF-8 characters although the VM is started in Unicode
- filename mode).
-
-posix()
- an atom which is named from the POSIX error codes used in
- Unix, and in the runtime libraries of most C compilers
-
-ext_posix() = posix() | badarg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ As returned by
+ file:open/2 ,
+ a process handling IO protocols.
+
+
+
+
+
+ If VM is in Unicode filename mode, string() and char()
+ are allowed to be > 255.
+ RawFilename is a filename not subject to
+ Unicode translation,
+ meaning that it can contain characters not conforming to
+ the Unicode encoding expected from the filesystem
+ (i.e. non-UTF-8 characters although the VM is started
+ in Unicode filename mode).
+
+
+
+
+
+
+ An atom which is named from the POSIX error codes used in
+ Unix, and in the runtime libraries of most C compilers.
+
+
+
+
+
+
+
+
+
+
+
+ Must denote a valid date and time.
+
+
+
+
+
+
+
+
+
+
+
+
-time() = {{Year, Month, Day}, {Hour, Minute, Second}}
- Year = Month = Day = Hour = Minute = Second = int()
- Must denote a valid date and time
- Changes group of a file. See
Changes permissions of a file. See
Changes owner of a file. See
Changes owner and group of a file. See
Changes the modification and access times of a file. See
Changes the modification and last access times of a file. See
Closes the file referenced by
Closes the file referenced by
Note that if the option
Reads Erlang terms, separated by '.', from
Reads Erlang terms, separated by '.', from
+
The file was successfully read.
An error occurred when interpreting the Erlang terms in
the file. Use
Copies
Copies
The argument
The argument
If both
If both
If
If
If
If
Returns
Returns
Typical error reasons: As for
Tries to delete the directory
Tries to delete the directory
Typical error reasons are:
@@ -333,7 +314,7 @@ f.txt: {person, "kalle", 25}.Missing search or write permissions for the parent
- directories of
A component of
A component of
Tries to delete the file
Tries to delete the file
Typical error reasons are:
In a future release, a bad type for the
In a future release, a bad type for the
+
Reads and evaluates Erlang expressions, separated by '.' (or
',', a sequence of expressions is also an expression), from
-
An error occurred when opening the file or reading it.
See
An error occurred when interpreting the Erlang
expressions in the file. Use
The same as
Given the error reason returned by any function in this module, returns a descriptive string of the error in English.
Returns
Returns
In rare circumstances, this function can fail on Unix. @@ -496,17 +454,14 @@ f.txt: {person, "kalle", 25}.
This function returns
The operating system have no concept of drives.
+The operating system has no concept of drives.
The format of
The format of
Lists all the files in a directory. Returns
-
Typical error reasons are:
Missing search or write permissions for
Missing search or write permissions for
Tries to create the directory
Tries to create the directory
Typical error reasons are:
@@ -572,15 +518,15 @@ f.txt: {person, "kalle", 25}.Missing search or write permissions for the parent
- directories of
There is already a file or directory named
There is already a file or directory named
A component of
A component of
A component of
A component of
Makes a hard link from
Makes a hard link from
Typical error reasons:
Missing read or write permissions for the parent
- directories of
This function creates a symbolic link
This function creates a symbolic link
Typical error reasons:
Missing read or write permissions for the parent
- directories of
Missing read or write permissions for the parent directories
+ of
Opens the file
Opens the file
Returns:
The file has been opened in the requested mode.
-
The file could not be opened.
In previous versions of
Searches the path
Searches the path
The file was successfully read.
The file was successfully read.
The file could not be found in any of the directories in
-
An error occurred when interpreting the Erlang terms in
the file. Use
Searches the path
Searches the path
The file was read and evaluated.
The file was read and evaluated.
The file could not be found in any of the directories in
-
An error occurred when interpreting the Erlang
expressions in the file. Use
Searches the path
Searches the path
The file has been opened in the requested mode.
-
The file could not be found in any of the directories in
-
Searches the path
Searches the path
The file was read and evaluated.
The file was read and evaluated.
The file could not be found in any of the directories in
-
An error occurred when interpreting the Erlang
expressions in the file. Use
The same as
If
If
If this node's file server is not a slave, the file was
opened by this node's file server, (this implies that
-
Sets the position of the file referenced by
Sets the position of the file referenced by
Either
Either
Performs a sequence of
Combines
As the position is given as a byte-offset, special caution has to be taken when working with files where
Performs a sequence of
When positioning in a file with other
Combines
When positioning in a file with other
Reads
Reads
Also if
The function returns:
If the file was opened in binary mode, the read bytes are returned in a binary, otherwise in a list. The list or @@ -1285,10 +1136,10 @@ f.txt: {person, "kalle", 25}.
Returned if
Returned if
An error occurred.
Returns
Returns
Typical error reasons:
Retrieves information about a file. Returns
-
The record
Size of file in bytes.
The file permissions as the sum of the following bit values:
@@ -1422,33 +1266,33 @@ f.txt: {person, "kalle", 25}.On Unix platforms, other bits than those listed above may be set.
Number of links to the file (this will always be 1 for file systems which have no concept of links).
Identifies the file system where the file is located. In Windows, the number indicates a drive as follows: 0 means A:, 1 means B:, and so on.
Only valid for character devices on Unix. In all other cases, this field is zero.
Gives the
Indicates the owner of the file. Will be zero for non-Unix file systems.
Gives the group that the owner of the file belongs to. Will be zero for non-Unix file systems.
@@ -1474,21 +1318,16 @@ f.txt: {person, "kalle", 25}.Reads a line of bytes/characters from the file referenced by
-
The function can be used on files opened in
If
The function returns:
One line from the file is returned, including the trailing LF, but with CRLF sequences replaced by a single LF (see above).
If the file was opened in binary mode, the read bytes are @@ -1499,7 +1338,7 @@ f.txt: {person, "kalle", 25}.
Returned if end of file was reached before anything at all could be read.
An error occurred.
This function returns
This function returns
Typical error reasons:
This function works like
If
If
Tries to rename the file
Tries to rename the file Missing read or write permissions for the parent
- directories of
Reads and evaluates Erlang expressions, separated by '.' (or ',', a sequence of expressions is also an expression), from the file. Returns one of the following:
The file was read and evaluated.
The file was read and evaluated.
An error occurred when interpreting the Erlang
expressions in the file. Use
The same as
Sets the current working directory of the file server to
-
Typical error reasons are:
A component of
A component of
In a future release, a bad type for the
In a future release, a bad type for the
+
Makes sure that any buffers kept by the operating system (not by the Erlang runtime system) are written to disk. On @@ -1743,12 +1553,8 @@ f.txt: {person, "kalle", 25}.
Makes sure that any buffers kept by the operating system (not by the Erlang runtime system) are written to disk. In @@ -1770,32 +1576,23 @@ f.txt: {person, "kalle", 25}.
Truncates the file referenced by
Truncates the file referenced by
Writes
Writes
If the file is opened with
Typical error reasons are:
Writes the contents of the iodata term
Writes the contents of the iodata term
Typical error reasons are:
Same as
Change file information. Returns
The file permissions as the sum of the following bit values:
@@ -1932,12 +1715,12 @@ f.txt: {person, "kalle", 25}.On Unix platforms, other bits than those listed above may be set.
Indicates the owner of the file. Ignored for non-Unix file systems.
Gives the group that the owner of the file belongs to. Ignored non-Unix file systems.
-- cgit v1.2.3