summaryrefslogtreecommitdiff
path: root/lib/kernel/doc
diff options
context:
space:
mode:
authorAndre Nathan <andre@digirati.com.br>2019-04-18 17:45:04 -0300
committerAndre Nathan <andre@digirati.com.br>2019-05-14 11:16:58 -0300
commitbd3f4f05bb6dafdedbae5671ee50c769a3560021 (patch)
tree45c7a8e844a8f7b10cce1b6e20646fece3ef20a6 /lib/kernel/doc
parentc6d5af1054f8d555a69111f29b59d5485ef8e48f (diff)
downloaderlang-bd3f4f05bb6dafdedbae5671ee50c769a3560021.tar.gz
file: allow open/2 to work on directories
This is useful mainly to ensure that a new file has been persisted to disk by calling file:sync/1 or file:datasync/1 on file's parent directory.
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r--lib/kernel/doc/src/file.xml10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml
index fc25e83d40..b3e8149cc2 100644
--- a/lib/kernel/doc/src/file.xml
+++ b/lib/kernel/doc/src/file.xml
@@ -939,6 +939,10 @@ f.txt: {person, "kalle", 25}.
support for POSIX <c>O_SYNC</c> or equivalent, use of the <c>sync</c>
flag causes <c>open</c> to return <c>{error, enotsup}</c>.</p>
</item>
+ <tag><c>directory</c></tag>
+ <item>
+ <p>Allows <c>open</c> to work on directories.</p>
+ </item>
</taglist>
<p>Returns:</p>
<taglist>
@@ -985,8 +989,10 @@ f.txt: {person, "kalle", 25}.
</item>
<tag><c>enotdir</c></tag>
<item>
- <p>A component of the filename is not a directory. On some
- platforms, <c>enoent</c> is returned instead.</p>
+ <p>A component of the filename is not a directory, or the
+ filename itself is not a directory if <c>directory</c>
+ mode was specified. On some platforms, <c>enoent</c> is
+ returned instead.</p>
</item>
<tag><c>enospc</c></tag>
<item>