diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-07-24 16:20:41 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2013-07-24 16:20:41 +0200 |
commit | 6f5c8d0bbd71f65656d4402be23bf6f3daca8fa5 (patch) | |
tree | 8e4032dc1686033a9c244b4764f644bff5dd88fe /lib/stdlib/src | |
parent | aeefa171ec8478438d60ef1ce11db387bacbfdaf (diff) | |
parent | 81daa95ab45677676ebb4f05c4e25dbc42b116ed (diff) | |
download | otp-6f5c8d0bbd71f65656d4402be23bf6f3daca8fa5.tar.gz otp-6f5c8d0bbd71f65656d4402be23bf6f3daca8fa5.tar.bz2 otp-6f5c8d0bbd71f65656d4402be23bf6f3daca8fa5.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/filelib.erl | 23 | ||||
-rw-r--r-- | lib/stdlib/src/io.erl | 2 |
2 files changed, 14 insertions, 11 deletions
diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl index 42885bcdcf..5b7bc0ab21 100644 --- a/lib/stdlib/src/filelib.erl +++ b/lib/stdlib/src/filelib.erl @@ -41,6 +41,9 @@ -type filename() :: file:name(). -type dirname() :: filename(). +-type filename_all() :: file:name_all(). +-type dirname_all() :: filename_all(). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -spec wildcard(Wildcard) -> [file:filename()] when @@ -62,29 +65,29 @@ wildcard(Pattern, Cwd, Mod) ?HANDLE_ERROR(do_wildcard(Pattern, Cwd, Mod)). -spec is_dir(Name) -> boolean() when - Name :: filename() | dirname(). + Name :: filename_all() | dirname_all(). is_dir(Dir) -> do_is_dir(Dir, file). --spec is_dir(file:name(), atom()) -> boolean(). +-spec is_dir(file:name_all(), atom()) -> boolean(). is_dir(Dir, Mod) when is_atom(Mod) -> do_is_dir(Dir, Mod). -spec is_file(Name) -> boolean() when - Name :: filename() | dirname(). + Name :: filename_all() | dirname_all(). is_file(File) -> do_is_file(File, file). --spec is_file(file:name(), atom()) -> boolean(). +-spec is_file(file:name_all(), atom()) -> boolean(). is_file(File, Mod) when is_atom(Mod) -> do_is_file(File, Mod). -spec is_regular(Name) -> boolean() when - Name :: filename(). + Name :: filename_all(). is_regular(File) -> do_is_regular(File, file). --spec is_regular(file:name(), atom()) -> boolean(). +-spec is_regular(file:name_all(), atom()) -> boolean(). is_regular(File, Mod) when is_atom(Mod) -> do_is_regular(File, Mod). @@ -103,16 +106,16 @@ fold_files(Dir, RegExp, Recursive, Fun, Acc, Mod) when is_atom(Mod) -> do_fold_files(Dir, RegExp, Recursive, Fun, Acc, Mod). -spec last_modified(Name) -> file:date_time() | 0 when - Name :: filename() | dirname(). + Name :: filename_all() | dirname_all(). last_modified(File) -> do_last_modified(File, file). --spec last_modified(file:name(), atom()) -> file:date_time() | 0. +-spec last_modified(file:name_all(), atom()) -> file:date_time() | 0. last_modified(File, Mod) when is_atom(Mod) -> do_last_modified(File, Mod). -spec file_size(Filename) -> non_neg_integer() when - Filename :: filename(). + Filename :: filename_all(). file_size(File) -> do_file_size(File, file). @@ -218,7 +221,7 @@ do_file_size(File, Mod) -> %% ensures that the directory name required to create D exists -spec ensure_dir(Name) -> 'ok' | {'error', Reason} when - Name :: filename() | dirname(), + Name :: filename_all() | dirname_all(), Reason :: file:posix(). ensure_dir("/") -> ok; diff --git a/lib/stdlib/src/io.erl b/lib/stdlib/src/io.erl index 53728237ca..b11d41e2eb 100644 --- a/lib/stdlib/src/io.erl +++ b/lib/stdlib/src/io.erl @@ -40,7 +40,7 @@ %%------------------------------------------------------------------------- -type device() :: atom() | pid(). --type prompt() :: atom() | string(). +-type prompt() :: atom() | unicode:chardata(). %% ErrorDescription is whatever the I/O-server sends. -type server_no_data() :: {'error', ErrorDescription :: term()} | 'eof'. |