aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2012-11-20 11:43:50 +0100
committerPatrik Nyblom <[email protected]>2012-12-20 14:58:31 +0100
commit3f9fd7144dd5598dc55f2e1e071c1db581646314 (patch)
tree9ae554c31583777731e55fe22dc44e2c6dcbb928 /lib/kernel
parentd96af2dd3333e8870523402de97f022796c34b5c (diff)
downloadotp-3f9fd7144dd5598dc55f2e1e071c1db581646314.tar.gz
otp-3f9fd7144dd5598dc55f2e1e071c1db581646314.tar.bz2
otp-3f9fd7144dd5598dc55f2e1e071c1db581646314.zip
Move ram option from mode() type into open/2 spec
The mode() type is used in path_open and copy, two functions that do _not_ accept the ram option (or is at least not supposed to), why I moved the option 'ram' from the type down to the spec for open itself. That also makes the option visible directly under open/2 in the documentation.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/file.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 85426baba1..4f7c984b11 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -88,7 +88,7 @@
| {'cur', Offset :: integer()}
| {'eof', Offset :: integer()} | 'bof' | 'cur' | 'eof'.
-type mode() :: 'read' | 'write' | 'append'
- | 'exclusive' | 'raw' | 'binary' | 'ram'
+ | 'exclusive' | 'raw' | 'binary'
| {'delayed_write',
Size :: non_neg_integer(),
Delay :: non_neg_integer()}
@@ -400,7 +400,7 @@ raw_write_file_info(Name, #file_info{} = Info) ->
-spec open(File, Modes) -> {ok, IoDevice} | {error, Reason} when
File :: Filename | iodata(),
Filename :: name(),
- Modes :: [mode()],
+ Modes :: [mode() | ram],
IoDevice :: io_device(),
Reason :: posix() | badarg | system_limit.