From bd3f4f05bb6dafdedbae5671ee50c769a3560021 Mon Sep 17 00:00:00 2001 From: Andre Nathan Date: Thu, 18 Apr 2019 17:45:04 -0300 Subject: 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. --- lib/kernel/doc/src/file.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/kernel/doc/src') 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 O_SYNC or equivalent, use of the sync flag causes open to return {error, enotsup}.

+ directory + +

Allows open to work on directories.

+

Returns:

@@ -985,8 +989,10 @@ f.txt: {person, "kalle", 25}. enotdir -

A component of the filename is not a directory. On some - platforms, enoent is returned instead.

+

A component of the filename is not a directory, or the + filename itself is not a directory if directory + mode was specified. On some platforms, enoent is + returned instead.

enospc -- cgit v1.2.3