aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/prim_file_nif.h
diff options
context:
space:
mode:
authorAndre Nathan <[email protected]>2019-04-18 17:45:04 -0300
committerAndre Nathan <[email protected]>2019-05-14 11:16:58 -0300
commitbd3f4f05bb6dafdedbae5671ee50c769a3560021 (patch)
tree45c7a8e844a8f7b10cce1b6e20646fece3ef20a6 /erts/emulator/nifs/common/prim_file_nif.h
parentc6d5af1054f8d555a69111f29b59d5485ef8e48f (diff)
downloadotp-bd3f4f05bb6dafdedbae5671ee50c769a3560021.tar.gz
otp-bd3f4f05bb6dafdedbae5671ee50c769a3560021.tar.bz2
otp-bd3f4f05bb6dafdedbae5671ee50c769a3560021.zip
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 'erts/emulator/nifs/common/prim_file_nif.h')
-rw-r--r--erts/emulator/nifs/common/prim_file_nif.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/prim_file_nif.h b/erts/emulator/nifs/common/prim_file_nif.h
index b2e30c59dd..020714a03b 100644
--- a/erts/emulator/nifs/common/prim_file_nif.h
+++ b/erts/emulator/nifs/common/prim_file_nif.h
@@ -30,6 +30,8 @@ enum efile_modes_t {
EFILE_MODE_SKIP_TYPE_CHECK = (1 << 5), /* Special for device files on Unix. */
EFILE_MODE_NO_TRUNCATE = (1 << 6), /* Special for reopening on VxWorks. */
+ EFILE_MODE_DIRECTORY = (1 << 7),
+
EFILE_MODE_READ_WRITE = EFILE_MODE_READ | EFILE_MODE_WRITE
};