aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/c.xml
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-05-22 11:39:13 +0200
committerBjörn Gustavsson <[email protected]>2013-05-22 11:54:37 +0200
commit67d83e15fdee068217df7f14a32fb901d7d4d91b (patch)
tree081b55a57e9d41494694e2b74eda30d6a2d57a05 /lib/stdlib/doc/src/c.xml
parent2886d9937990c3465671b59d744f6bacd43545c8 (diff)
downloadotp-67d83e15fdee068217df7f14a32fb901d7d4d91b.tar.gz
otp-67d83e15fdee068217df7f14a32fb901d7d4d91b.tar.bz2
otp-67d83e15fdee068217df7f14a32fb901d7d4d91b.zip
Teach c:ls/1 to show non-directory files
In an email to erlang-questions, Bengt Kleberg wrote: When I use c:ls/1 it reminds me so much of Unix "ls" that I expect c:ls("filename") to work. The resulting error surprises me every time (not the same day). While teaching c:ls/1 to show non-directory files, update the error handling to make use of the POSIX error codes from file:list_dir/1 and file:format_error/1 (which had not been invented when the c module was first implemented). Suggested-by: Bengt Kleberg Test-suite-by: Bengt Kleberg
Diffstat (limited to 'lib/stdlib/doc/src/c.xml')
-rw-r--r--lib/stdlib/doc/src/c.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/doc/src/c.xml b/lib/stdlib/doc/src/c.xml
index ddae388a1b..9cd4581a89 100644
--- a/lib/stdlib/doc/src/c.xml
+++ b/lib/stdlib/doc/src/c.xml
@@ -140,9 +140,9 @@ compile:file(<anno>File</anno>, <anno>Options</anno> ++ [report_errors, report_w
</func>
<func>
<name name="ls" arity="1"/>
- <fsummary>List files in a directory</fsummary>
+ <fsummary>List files in a directory or a single file</fsummary>
<desc>
- <p>Lists files in directory <c><anno>Dir</anno></c>.</p>
+ <p>Lists files in directory <c><anno>Dir</anno></c> or, if Dir is a file, only list it.</p>
</desc>
</func>
<func>