• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FS_CALL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FS_CALL函数的典型用法代码示例。如果您正苦于以下问题:C++ FS_CALL函数的具体用法?C++ FS_CALL怎么用?C++ FS_CALL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了FS_CALL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: IO

	virtual status_t IO(off_t offset, void* buffer, size_t* length)
	{
		iovec vec;
		vec.iov_base = buffer;
		vec.iov_len = *length;

		if (fWrite) {
			return FS_CALL(fVnode, write_pages, fCookie, offset, &vec, 1,
				length);
		}

		return FS_CALL(fVnode, read_pages, fCookie, offset, &vec, 1, length);
	}
开发者ID:RAZVOR,项目名称:haiku,代码行数:13,代码来源:vfs_request_io.cpp


示例2: luv_fs_write

static int luv_fs_write(lua_State* L) {
  uv_file file = luaL_checkinteger(L, 1);
  uv_buf_t buf;
  int64_t offset;
  int ref;
  uv_fs_t* req;
  size_t count;
  uv_buf_t *bufs = NULL;

  if (lua_istable(L, 2)) {
    bufs = luv_prep_bufs(L, 2, &count);
  }
  else if (lua_isstring(L, 2)) {
    luv_check_buf(L, 2, &buf);
    count = 1;
  }
  else {
    return luaL_argerror(L, 2, "data must be string or table of strings");
  }

  offset = luaL_checkinteger(L, 3);
  ref = luv_check_continuation(L, 4);
  req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  req->ptr = buf.base;
  ((luv_req_t*)req->data)->data = bufs;
  FS_CALL(write, req, file, bufs ? bufs : &buf, count, offset);
}
开发者ID:kidaa,项目名称:luv,代码行数:28,代码来源:fs.c


示例3: luv_fs_symlink

int luv_fs_symlink(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  const char* new_path = luaL_checkstring(L, 2);
  int flags = luv_string_to_flags(L, luaL_checkstring(L, 3));
  uv_fs_t* req = luv_fs_store_callback(L, 4);
  FS_CALL(symlink, 4, new_path, path, new_path, flags);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:7,代码来源:luv_fs.c


示例4: luv_fs_chown

int luv_fs_chown(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  int uid = luaL_checkint(L, 2);
  int gid = luaL_checkint(L, 3);
  uv_fs_t* req = luv_fs_store_callback(L, 4);
  FS_CALL(chown, 4, path, path, uid, gid);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:7,代码来源:luv_fs.c


示例5: luv_fs_mkdtemp

static int luv_fs_mkdtemp(lua_State* L) {
  const char* tpl = luaL_checkstring(L, 1);
  int ref = luv_check_continuation(L, 2);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(mkdtemp, req, tpl);
}
开发者ID:kidaa,项目名称:luv,代码行数:7,代码来源:fs.c


示例6: luv_fs_futime

int luv_fs_futime(lua_State* L) {
  uv_file file = luaL_checkint(L, 1);
  double atime = luaL_checknumber(L, 2);
  double mtime = luaL_checknumber(L, 3);
  uv_fs_t* req = luv_fs_store_callback(L, 4);
  FS_CALL(futime, 4, NULL, file, atime, mtime);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:7,代码来源:luv_fs.c


示例7: luv_fs_open

int luv_fs_open(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  int flags = luv_string_to_flags(L, luaL_checkstring(L, 2));
  int mode = luaL_checkint(L, 3);
  uv_fs_t* req = luv_fs_store_callback(L, 4);
  FS_CALL(open, 4, path, path, flags, mode);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:7,代码来源:luv_fs.c


示例8: luv_fs_fchown

int luv_fs_fchown(lua_State* L) {
  uv_file file = luaL_checkint(L, 1);
  int uid = luaL_checkint(L, 2);
  int gid = luaL_checkint(L, 3);
  uv_fs_t* req = luv_fs_store_callback(L, 4);
  FS_CALL(fchown, 4, NULL, file, uid, gid);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:7,代码来源:luv_fs.c


示例9: luv_fs_readlink

static int luv_fs_readlink(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  int ref = luv_check_continuation(L, 2);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(readlink, req, path);
}
开发者ID:kidaa,项目名称:luv,代码行数:7,代码来源:fs.c


示例10: luv_fs_utime

int luv_fs_utime(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  double atime = luaL_checknumber(L, 2);
  double mtime = luaL_checknumber(L, 3);
  uv_fs_t* req = luv_fs_store_callback(L, 4);
  FS_CALL(utime, 4, path, path, atime, mtime);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:7,代码来源:luv_fs.c


示例11: luv_fs_fdatasync

static int luv_fs_fdatasync(lua_State* L) {
  uv_file file = luaL_checkinteger(L, 1);
  int ref = luv_check_continuation(L, 2);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(fdatasync, req, file);
}
开发者ID:kidaa,项目名称:luv,代码行数:7,代码来源:fs.c


示例12: luv_fs_write

int luv_fs_write(lua_State* L) {
    uv_file file = luaL_checkint(L, 1);
    off_t offset = luaL_checkint(L, 2);
    size_t length;
    void* chunk = (void*)luaL_checklstring(L, 3, &length);
    uv_fs_t* req = luv_fs_store_callback(L, 4);
    FS_CALL(write, 4, NULL, file, chunk, length, offset);
}
开发者ID:nko,项目名称:luvit,代码行数:8,代码来源:luv_fs.c


示例13: luv_fs_chmod

static int luv_fs_chmod(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  int mode = luaL_checkinteger(L, 2);
  int ref = luv_check_continuation(L, 3);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(chmod, req, path, mode);
}
开发者ID:kidaa,项目名称:luv,代码行数:8,代码来源:fs.c


示例14: luv_fs_access

static int luv_fs_access(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  int amode = luv_check_amode(L, 2);
  int ref = luv_check_continuation(L, 3);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(access, req, path, amode);
}
开发者ID:kidaa,项目名称:luv,代码行数:8,代码来源:fs.c


示例15: luv_fs_sendfile

int luv_fs_sendfile(lua_State* L) {
  uv_file out_fd = luaL_checkint(L, 1);
  uv_file in_fd = luaL_checkint(L, 2);
  off_t in_offset = luaL_checkint(L, 3);
  size_t length = luaL_checkint(L, 4);
  uv_fs_t* req = luv_fs_store_callback(L, 5);
  FS_CALL(sendfile, 5, NULL, out_fd, in_fd, in_offset, length);
}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:8,代码来源:luv_fs.c


示例16: luv_fs_ftruncate

static int luv_fs_ftruncate(lua_State* L) {
  uv_file file = luaL_checkinteger(L, 1);
  int64_t offset = luaL_checkinteger(L, 2);
  int ref = luv_check_continuation(L, 3);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(ftruncate, req, file, offset);
}
开发者ID:kidaa,项目名称:luv,代码行数:8,代码来源:fs.c


示例17: luv_fs_scandir

static int luv_fs_scandir(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  int flags = 0; // TODO: find out what these flags are.
  int ref = luv_check_continuation(L, 2);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(scandir, req, path, flags);
}
开发者ID:kidaa,项目名称:luv,代码行数:8,代码来源:fs.c


示例18: luv_fs_fchown

static int luv_fs_fchown(lua_State* L) {
  uv_file file = luaL_checkinteger(L, 1);
  uv_uid_t uid = luaL_checkinteger(L, 2);
  uv_uid_t gid = luaL_checkinteger(L, 3);
  int ref = luv_check_continuation(L, 4);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(fchown, req, file, uid, gid);
}
开发者ID:kidaa,项目名称:luv,代码行数:9,代码来源:fs.c


示例19: luv_fs_chown

static int luv_fs_chown(lua_State* L) {
  const char* path = luaL_checkstring(L, 1);
  uv_uid_t uid = luaL_checkinteger(L, 2);
  uv_uid_t gid = luaL_checkinteger(L, 3);
  int ref = luv_check_continuation(L, 4);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(chown, req, path, uid, gid);
}
开发者ID:kidaa,项目名称:luv,代码行数:9,代码来源:fs.c


示例20: luv_fs_futime

static int luv_fs_futime(lua_State* L) {
  uv_file file = luaL_checkinteger(L, 1);
  double atime = luaL_checknumber(L, 2);
  double mtime = luaL_checknumber(L, 3);
  int ref = luv_check_continuation(L, 4);
  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
  req->data = luv_setup_req(L, ref);
  FS_CALL(futime, req, file, atime, mtime);
}
开发者ID:kidaa,项目名称:luv,代码行数:9,代码来源:fs.c



注:本文中的FS_CALL函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FS_Close函数代码示例发布时间:2022-05-30
下一篇:
C++ FSTR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap