diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-25 16:50:08 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-11-03 15:15:41 -0800 |
| commit | 7bf58c2baaac3f7cb3c8e8d735b27ac9e7d3cd78 (patch) | |
| tree | 398fa2a360e660fa4e6fc05a5994a2dce67318dc /src/rt/rust_uv.cpp | |
| parent | d7b6502784cad759cee9961426313017f052d5ba (diff) | |
| download | rust-7bf58c2baaac3f7cb3c8e8d735b27ac9e7d3cd78.tar.gz rust-7bf58c2baaac3f7cb3c8e8d735b27ac9e7d3cd78.zip | |
Modify IoFactory's fs_mkdir, and add fs_rename
The invocation for making a directory should be able to specify a mode to make the directory with (instead of defaulting to one particular mode). Additionally, libuv and various OSes implement efficient versions of renaming files, so this operation is exposed as an IoFactory call.
Diffstat (limited to 'src/rt/rust_uv.cpp')
| -rw-r--r-- | src/rt/rust_uv.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt/rust_uv.cpp b/src/rt/rust_uv.cpp index c59dacab889..70602100f2e 100644 --- a/src/rt/rust_uv.cpp +++ b/src/rt/rust_uv.cpp @@ -592,6 +592,11 @@ extern "C" int rust_uv_fs_readdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_cb cb) { return uv_fs_readdir(loop, req, path, flags, cb); } +extern "C" int +rust_uv_fs_rename(uv_loop_t *loop, uv_fs_t* req, const char *path, + const char *to, uv_fs_cb cb) { + return uv_fs_rename(loop, req, path, to, cb); +} extern "C" int rust_uv_spawn(uv_loop_t *loop, uv_process_t *p, uv_process_options_t options) { |
