From b89f4f34a48594dbb36e1c45eb7879bf5a6ee77f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 1 Sep 2011 17:40:57 -0700 Subject: [PATCH] implement uv_fs_utime --- src/unix/fs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 27055d68..fc4edbb2 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -416,10 +416,17 @@ int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, } +static int _utime(const char* path, double atime, double mtime) { + struct utimbuf buf; + buf.actime = atime; + buf.modtime = mtime; + return utime(path, &buf); +} + + int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, double mtime, uv_fs_cb cb) { - assert(0 && "implement me"); - return -1; + WRAP_EIO(UV_FS_UTIME, eio_utime, _utime, ARGS3(path, atime, mtime)) }