aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2014-02-27 12:41:53 +0100
committerJosé Valim <[email protected]>2014-03-10 16:33:40 -0700
commitb45af5f9608d5dc79a5f201afdcc9a7e28e7ba83 (patch)
treee29a75437513104f820f3ad84b76fd7cf01fc0af /lib/kernel/src
parent8acc644e162bad52f7ab81c76c0cad15628e4f3d (diff)
downloadotp-b45af5f9608d5dc79a5f201afdcc9a7e28e7ba83.tar.gz
otp-b45af5f9608d5dc79a5f201afdcc9a7e28e7ba83.tar.bz2
otp-b45af5f9608d5dc79a5f201afdcc9a7e28e7ba83.zip
Correct file:set_cwd/1 typespec
file:set_cwd/1 accepts binaries as arguments, however the binaries must be properly encoded as per file:native_name_encoding/0. Also update the note under no_translation error to refer that passing a ISO-latin-1 encoded binary under any unicode file name encoding.
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/file.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 36289053eb..5467175654 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -197,7 +197,8 @@ get_cwd(Drive) ->
check_and_call(get_cwd, [file_name(Drive)]).
-spec set_cwd(Dir) -> ok | {error, Reason} when
- Dir :: name(),
+ Dir :: name() | EncodedBinary,
+ EncodedBinary :: binary(),
Reason :: posix() | badarg | no_translation.
set_cwd(Dirname) ->