예제 #1
0
파일: jl_uv.c 프로젝트: 0/julia
JL_DLLEXPORT int jl_fs_chown(char *path, int uid, int gid)
{
    uv_fs_t req;
    int ret = uv_fs_chown(jl_io_loop, &req, path, uid, gid, NULL);
    uv_fs_req_cleanup(&req);
    return ret;
}
예제 #2
0
/*
 * fs.chown
 */
static int fs_chown(lua_State* L) {
  FSR__SETUP
  const char *path = luaL_checkstring(L, 1);
  int uid = luaL_checkint(L, 2);
  int gid = luaL_checkint(L, 3);
  FSR__SET_OPT_CB(4, on_fs_callback)
  uv_fs_chown(loop, req, path, uid, gid, cb);
  FSR__TEARDOWN
}