From f5c7f087db71422e4a624525a2362055b73f5456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 13 Feb 2013 14:10:17 +0100 Subject: filelib: Update documentation --- lib/stdlib/doc/src/filelib.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/stdlib/doc/src/filelib.xml b/lib/stdlib/doc/src/filelib.xml index ac67596f3c..bd780b2b2f 100644 --- a/lib/stdlib/doc/src/filelib.xml +++ b/lib/stdlib/doc/src/filelib.xml @@ -36,8 +36,9 @@

This module contains utilities on a higher level than the file module.

-

The module supports Unicode file names, so that it will match against regular expressions given in Unicode and that it will find and process raw file names (i.e. files named in a way that does not confirm to the expected encoding).

-

If the VM operates in Unicode file naming mode on a machine with transparent file naming, the fun() provided to fold_files/5 needs to be prepared to handle binary file names.

+

This module does not support "raw" file names (i.e. files whose names + do not comply with the expected encoding). Such files will be ignored + by the functions in this module.

For more information about raw file names, see the file module.

-- cgit v1.2.3 From 0fa37f264ddd04eaa96955eda9c6548f630a1cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 13 Feb 2013 14:15:51 +0100 Subject: file: Remove note about Unicode handling being experimental --- lib/kernel/doc/src/file.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 069b13eacf..4851a53dd9 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -60,14 +60,6 @@ converted, why the Unicode mode for file names is not default on systems having completely transparent file naming.

- -

As of R14B01, the most basic file handling modules - (file, prim_file, filelib and - filename) accept raw file names, but the rest of OTP is not - guaranteed to handle them, why Unicode file naming on systems - where it is not default is still considered experimental.

-
-

Raw file names is a new feature in OTP R14B01, which allows the user to supply completely uninterpreted file names to the underlying OS/filesystem. They are supplied as binaries, where it -- cgit v1.2.3 From 9dd60c47d4e91f39933edc97840bbd68f10c55d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 13 Feb 2013 14:29:14 +0100 Subject: file: Document list_dir_all/1 and read_link_all/1 --- lib/kernel/doc/src/file.xml | 59 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 4851a53dd9..22a04c6c13 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -496,7 +496,8 @@ List files in a directory -

Lists all the files in a directory. Returns +

Lists all files in a directory, except files + with "raw" names. Returns {ok, Filenames} if successful. Otherwise, it returns {error, Reason}. Filenames is a list of @@ -516,6 +517,31 @@ + + + List all files in a directory + +

Lists all the files in a directory, including files with + "raw" names. + Returns {ok, Filenames} if successful. + Otherwise, it returns {error, Reason}. + Filenames is a list of + the names of all the files in the directory. The names are + not sorted.

+

Typical error reasons are:

+ + eacces + +

Missing search or write permissions for Dir + or one of its parent directories.

+
+ enoent + +

The directory does not exist.

+
+
+ + Make a directory @@ -1399,12 +1425,43 @@ See what a link is pointing to + +

This function returns {ok, Filename} if + Name refers to a symbolic link that is + not a "raw" file name, or {error, Reason} + otherwise. + On platforms that do not support symbolic links, the return + value will be {error,enotsup}.

+

Typical error reasons:

+ + einval + +

Name does not refer to a symbolic link + or the name of the file that it refers to does not conform + to the expected encoding.

+
+ enoent + +

The file does not exist.

+
+ enotsup + +

Symbolic links are not supported on this platform.

+
+
+
+
+ + + See what a link is pointing to

This function returns {ok, Filename} if Name refers to a symbolic link or {error, Reason} otherwise. On platforms that do not support symbolic links, the return value will be {error,enotsup}.

+

Note that Filename can be either a list + or a binary.

Typical error reasons:

einval -- cgit v1.2.3