diff options
author | John Högberg <[email protected]> | 2019-05-23 11:45:59 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2019-05-23 11:45:59 +0200 |
commit | 59a813cb8d9f687b612782be0103643837b2de8e (patch) | |
tree | c125908639d528def3eef843cb90fe4f9a5027bd /lib/kernel/src | |
parent | 242c3a7b2a51a4f95dbee3257f3a2f9130a1720e (diff) | |
parent | bd3f4f05bb6dafdedbae5671ee50c769a3560021 (diff) | |
download | otp-59a813cb8d9f687b612782be0103643837b2de8e.tar.gz otp-59a813cb8d9f687b612782be0103643837b2de8e.tar.bz2 otp-59a813cb8d9f687b612782be0103643837b2de8e.zip |
Merge pull request #2212 from andrenth/file-open-directories
file: allow open/2 to work on directories
OTP-15835
Diffstat (limited to 'lib/kernel/src')
-rw-r--r-- | lib/kernel/src/file.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl index 1d4e37196c..a0616da670 100644 --- a/lib/kernel/src/file.erl +++ b/lib/kernel/src/file.erl @@ -460,7 +460,7 @@ raw_write_file_info(Name, #file_info{} = Info) -> -spec open(File, Modes) -> {ok, IoDevice} | {error, Reason} when File :: Filename | iodata(), Filename :: name_all(), - Modes :: [mode() | ram], + Modes :: [mode() | ram | directory], IoDevice :: io_device(), Reason :: posix() | badarg | system_limit. @@ -1143,7 +1143,7 @@ path_script(Path, File, Bs) -> {ok, IoDevice, FullName} | {error, Reason} when Path :: [Dir :: name_all()], Filename :: name_all(), - Modes :: [mode()], + Modes :: [mode() | directory], IoDevice :: io_device(), FullName :: filename_all(), Reason :: posix() | badarg | system_limit. |