/* * fs.futime */ static int fs_futime(lua_State* L) { FSR__SETUP int fd = luaL_checkint(L, 1); lua_Number atime = luaL_checknumber(L, 2); lua_Number mtime = luaL_checknumber(L, 3); FSR__SET_OPT_CB(4, on_fs_callback) uv_fs_futime(loop, req, fd, atime, mtime, cb); FSR__TEARDOWN }
static int lluv_file_utime(lua_State* L) { const char *path = NULL; lluv_file_t *f = lluv_check_file(L, 1, LLUV_FLAG_OPEN); lluv_loop_t *loop = f->loop; double atime = luaL_checknumber(L, 2); double mtime = luaL_checknumber(L, 3); int argc = 3; LLUV_PRE_FILE(); lua_pushvalue(L, 1); req->file_ref = luaL_ref(L, LLUV_LUA_REGISTRY); err = uv_fs_futime(loop->handle, &req->req, f->handle, atime, mtime, cb); LLUV_POST_FILE(); }