您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FS_CALL函数代码示例

51自学网 2021-06-01 20:43:30
  C++
这篇教程C++ FS_CALL函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例21: luv_fs_utime

static 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);  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(utime, req, path, atime, mtime);}
开发者ID:kidaa,项目名称:luv,代码行数:9,


示例22: luv_fs_read

int luv_fs_read(lua_State* L) {    uv_file file = luaL_checkint(L, 1);    int offset = luaL_checkint(L, 2);    int length = luaL_checkint(L, 3);    uv_fs_t* req = luv_fs_store_callback(L, 4);    void* buf = malloc(length);    ((luv_fs_ref_t*)req->data)->buf = buf;    FS_CALL(read, 4, NULL, file, buf, length, offset);}
开发者ID:nko,项目名称:luvit,代码行数:9,


示例23: luv_fs_sendfile

static int luv_fs_sendfile(lua_State* L) {  uv_file out_fd = luaL_checkinteger(L, 1);  uv_file in_fd = luaL_checkinteger(L, 2);  int64_t in_offset = luaL_checkinteger(L, 3);  size_t length = luaL_checkinteger(L, 4);  int ref = luv_check_continuation(L, 5);  uv_fs_t* req = lua_newuserdata(L, sizeof(*req));  req->data = luv_setup_req(L, ref);  FS_CALL(sendfile, req, out_fd, in_fd, in_offset, length);}
开发者ID:kidaa,项目名称:luv,代码行数:10,


示例24: vfs_vnode_io

status_tvfs_vnode_io(struct vnode* vnode, void* cookie, io_request* request){	status_t result = B_ERROR;	if (!HAS_FS_CALL(vnode, io)		|| (result = FS_CALL(vnode, io, cookie, request)) == B_UNSUPPORTED) {		// no io() call -- fall back to synchronous I/O		VnodeIO io(request->IsWrite(), vnode, cookie);		return synchronous_io(request, io);	}	return result;}
开发者ID:RAZVOR,项目名称:haiku,代码行数:13,


示例25: 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;  uv_fs_t* req;  void* chunk = (void*)luaL_checklstring(L, 3, &length);  luv_fs_ref_t* ref = luv_fs_ref_alloc(L);  luv_io_ctx_init(&ref->cbs);  luv_io_ctx_add(L, &ref->cbs, 3);  luv_io_ctx_callback_add(L, &ref->cbs, 4);  req = &ref->fs_req;  FS_CALL(write, 4, NULL, file, chunk, length, offset);}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:13,


示例26: luv_fs_read

static int luv_fs_read(lua_State* L) {  uv_file file = luaL_checkinteger(L, 1);  int64_t len = luaL_checkinteger(L, 2);  int64_t offset = luaL_checkinteger(L, 3);  uv_buf_t buf;  int ref;  uv_fs_t* req;  char* data = malloc(len);  if (!data) return luaL_error(L, "Failure to allocate buffer");  buf = uv_buf_init(data, len);  ref = luv_check_continuation(L, 4);  req = lua_newuserdata(L, sizeof(*req));  req->data = luv_setup_req(L, ref);  // TODO: find out why we can't just use req->ptr for the base  ((luv_req_t*)req->data)->data = buf.base;  FS_CALL(read, req, file, &buf, 1, offset);}
开发者ID:kidaa,项目名称:luv,代码行数:17,


示例27: luv_fs_symlink

static int luv_fs_symlink(lua_State* L) {  const char* path = luaL_checkstring(L, 1);  const char* new_path = luaL_checkstring(L, 2);  int flags = 0, ref;  uv_fs_t* req;  if (lua_type(L, 3) == LUA_TTABLE) {    lua_getfield(L, 3, "dir");    if (lua_toboolean(L, -1)) flags |= UV_FS_SYMLINK_DIR;    lua_pop(L, 1);    lua_getfield(L, 3, "junction");    if (lua_toboolean(L, -1)) flags |= UV_FS_SYMLINK_JUNCTION;    lua_pop(L, 1);  }  ref = luv_check_continuation(L, 4);  req = lua_newuserdata(L, sizeof(*req));  req->data = luv_setup_req(L, ref);  FS_CALL(symlink, req, path, new_path, flags);}
开发者ID:kidaa,项目名称:luv,代码行数:19,


示例28: luv_fs_read

int luv_fs_read(lua_State* L) {  uv_file file = luaL_checkint(L, 1);  int offset = -1;  int length;  uv_fs_t* req;  void* buf;  if (!lua_isnil(L, 2)) {    offset = luaL_checkint(L, 2);  }  length = luaL_checkint(L, 3);  req = luv_fs_store_callback(L, 4);  buf = malloc(length);  ((luv_fs_ref_t*)req->data)->buf = buf;    uv_buf_t bufs[1];  bufs[0].base = buf;  bufs[0].len = length;    FS_CALL(read, 4, NULL, file, bufs, 1, offset);}
开发者ID:Theintercooler,项目名称:luvit,代码行数:20,


示例29: luv_fs_fchmod

int luv_fs_fchmod(lua_State* L) {  uv_file file = luaL_checkint(L, 1);  int mode = strtoul(luaL_checkstring(L, 2), NULL, 8);  uv_fs_t* req = luv_fs_store_callback(L, 3);  FS_CALL(fchmod, 3, NULL, file, mode);}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:6,


示例30: luv_fs_readlink

int luv_fs_readlink(lua_State* L) {  const char* path = luaL_checkstring(L, 1);  uv_fs_t* req = luv_fs_store_callback(L, 2);  FS_CALL(readlink, 2, path, path);}
开发者ID:AndrewTsao,项目名称:luvit,代码行数:5,



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


C++ FS_Close函数代码示例
C++ FSTR函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。