Lines Matching refs:req
89 uv_fs_t *req = &ioContext->fs; in SimpleFileIO() local
92 req->data = ioContext; in SimpleFileIO()
96 uv_fs_read(context->loop, req, context->fsOpenReq.result, &iov, 1, index, context->cb); in SimpleFileIO()
105 uv_fs_write(context->loop, req, context->fsOpenReq.result, &iov, 1, index, context->cb); in SimpleFileIO()
121 void HdcTransferBase::OnFileClose(uv_fs_t *req) in OnFileClose() argument
124 uv_fs_req_cleanup(req); in OnFileClose()
125 CtxFile *context = (CtxFile *)req->data; in OnFileClose()
202 void HdcTransferBase::OnFileIO(uv_fs_t *req) in OnFileIO() argument
204 CtxFileIO *contextIO = reinterpret_cast<CtxFileIO *>(req->data); in OnFileIO()
209 uv_fs_req_cleanup(req); in OnFileIO()
214 if (req->result < 0) { in OnFileIO()
217 uv_strerror_r((int)req->result, buf, bufSize); in OnFileIO()
220 context->lastErrno = abs(req->result); in OnFileIO()
224 context->indexIO += req->result; in OnFileIO()
225 if (req->fs_type == UV_FS_READ) { in OnFileIO()
230 … if (!thisClass->SendIOPayload(context, context->indexIO - req->result, bufIO, req->result)) { in OnFileIO()
240 } else if (req->fs_type == UV_FS_WRITE) { // write in OnFileIO()
260 if (req->fs_type == UV_FS_WRITE) { in OnFileIO()
279 void HdcTransferBase::OnFileOpen(uv_fs_t *req) in OnFileOpen() argument
281 CtxFile *context = (CtxFile *)req->data; in OnFileOpen()
284 uv_fs_req_cleanup(req); in OnFileOpen()
288 if (req->result <= 0) { in OnFileOpen()
291 uv_strerror_r((int)req->result, buf, bufSize); in OnFileOpen()
368 uv_fs_t req = {}; in GetSubFiles() local
378 if (uv_fs_scandir(nullptr, &req, path, 0, nullptr) < 0) { in GetSubFiles()
379 uv_fs_req_cleanup(&req); in GetSubFiles()
382 while (uv_fs_scandir_next(&req, &dent) != UV_EOF) { in GetSubFiles()
401 uv_fs_req_cleanup(&req); in GetSubFiles()
409 uv_fs_t req = {}; in GetSubFilesRecursively() local
418 if (uv_fs_scandir(nullptr, &req, path.c_str(), 0, nullptr) < 0) { in GetSubFilesRecursively()
419 uv_fs_req_cleanup(&req); in GetSubFilesRecursively()
442 while (uv_fs_scandir_next(&req, &dent) != UV_EOF) { in GetSubFilesRecursively()
458 uv_fs_req_cleanup(&req); in GetSubFilesRecursively()
472 uv_fs_t req; in CheckLocalPath() local
473 int r = uv_fs_lstat(nullptr, &req, localPath.c_str(), nullptr); in CheckLocalPath()
474 mode_t mode = req.statbuf.st_mode; in CheckLocalPath()
475 uv_fs_req_cleanup(&req); in CheckLocalPath()
599 uv_fs_t req; in SmartSlavePath() local
600 int r = uv_fs_lstat(nullptr, &req, localPath.c_str(), nullptr); in SmartSlavePath()
601 uv_fs_req_cleanup(&req); in SmartSlavePath()
602 if (r == 0 && req.statbuf.st_mode & S_IFDIR) { // is dir in SmartSlavePath()