From 7bf58c2baaac3f7cb3c8e8d735b27ac9e7d3cd78 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 25 Oct 2013 16:50:08 -0700 Subject: 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. --- src/rt/rust_uv.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/rt/rust_uv.cpp') 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) { -- cgit 1.4.1-3-g733a5