• Home
  • Raw
  • Download

Lines Matching refs:req_wrap

482       FileHandleReadWrap* req_wrap = FileHandleReadWrap::from_req(req);  in ReadStart()  local
483 handle = req_wrap->file_handle_; in ReadStart()
484 CHECK_EQ(handle->current_read_.get(), req_wrap); in ReadStart()
548 int FileHandle::DoShutdown(ShutdownWrap* req_wrap) { in DoShutdown() argument
549 FileHandleCloseWrap* wrap = static_cast<FileHandleCloseWrap*>(req_wrap); in DoShutdown()
645 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterNoArgs() local
646 FSReqAfterScope after(req_wrap, req); in AfterNoArgs()
649 req_wrap->Resolve(Undefined(req_wrap->env()->isolate())); in AfterNoArgs()
653 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterStat() local
654 FSReqAfterScope after(req_wrap, req); in AfterStat()
657 req_wrap->ResolveStat(&req->statbuf); in AfterStat()
662 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterInteger() local
663 FSReqAfterScope after(req_wrap, req); in AfterInteger()
665 if (req->result >= 0 && req_wrap->is_plain_open()) in AfterInteger()
666 req_wrap->env()->AddUnmanagedFd(req->result); in AfterInteger()
669 req_wrap->Resolve(Integer::New(req_wrap->env()->isolate(), req->result)); in AfterInteger()
673 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterOpenFileHandle() local
674 FSReqAfterScope after(req_wrap, req); in AfterOpenFileHandle()
677 FileHandle* fd = FileHandle::New(req_wrap->binding_data(), req->result); in AfterOpenFileHandle()
679 req_wrap->Resolve(fd->object()); in AfterOpenFileHandle()
697 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterMkdirp() local
698 FSReqAfterScope after(req_wrap, req); in AfterMkdirp()
704 if (!req_wrap->continuation_data()->first_path().empty()) { in AfterMkdirp()
705 std::string first_path(req_wrap->continuation_data()->first_path()); in AfterMkdirp()
707 path = StringBytes::Encode(req_wrap->env()->isolate(), first_path.c_str(), in AfterMkdirp()
708 req_wrap->encoding(), in AfterMkdirp()
711 req_wrap->Reject(error); in AfterMkdirp()
713 req_wrap->Resolve(path.ToLocalChecked()); in AfterMkdirp()
715 req_wrap->Resolve(Undefined(req_wrap->env()->isolate())); in AfterMkdirp()
721 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterStringPath() local
722 FSReqAfterScope after(req_wrap, req); in AfterStringPath()
728 link = StringBytes::Encode(req_wrap->env()->isolate(), in AfterStringPath()
730 req_wrap->encoding(), in AfterStringPath()
733 req_wrap->Reject(error); in AfterStringPath()
735 req_wrap->Resolve(link.ToLocalChecked()); in AfterStringPath()
740 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterStringPtr() local
741 FSReqAfterScope after(req_wrap, req); in AfterStringPtr()
747 link = StringBytes::Encode(req_wrap->env()->isolate(), in AfterStringPtr()
749 req_wrap->encoding(), in AfterStringPtr()
752 req_wrap->Reject(error); in AfterStringPtr()
754 req_wrap->Resolve(link.ToLocalChecked()); in AfterStringPtr()
759 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterScanDir() local
760 FSReqAfterScope after(req_wrap, req); in AfterScanDir()
765 Environment* env = req_wrap->env(); in AfterScanDir()
777 return req_wrap->Reject(UVException( in AfterScanDir()
778 env->isolate(), r, nullptr, req_wrap->syscall(), req->path)); in AfterScanDir()
784 req_wrap->encoding(), in AfterScanDir()
787 return req_wrap->Reject(error); in AfterScanDir()
792 req_wrap->Resolve(Array::New(env->isolate(), name_v.data(), name_v.size())); in AfterScanDir()
796 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterScanDirWithTypes() local
797 FSReqAfterScope after(req_wrap, req); in AfterScanDirWithTypes()
803 Environment* env = req_wrap->env(); in AfterScanDirWithTypes()
818 return req_wrap->Reject( in AfterScanDirWithTypes()
819 UVException(isolate, r, nullptr, req_wrap->syscall(), req->path)); in AfterScanDirWithTypes()
825 req_wrap->encoding(), in AfterScanDirWithTypes()
828 return req_wrap->Reject(error); in AfterScanDirWithTypes()
838 req_wrap->Resolve(Array::New(isolate, result, arraysize(result))); in AfterScanDirWithTypes()
1349 FSReqWrapSync* req_wrap = ContainerOf(&FSReqWrapSync::req, req); in MKDirpSync() local
1352 if (req_wrap->continuation_data() == nullptr) { in MKDirpSync()
1353 req_wrap->set_continuation_data( in MKDirpSync()
1355 req_wrap->continuation_data()->PushPath(std::move(path)); in MKDirpSync()
1358 while (req_wrap->continuation_data()->paths().size() > 0) { in MKDirpSync()
1359 std::string next_path = req_wrap->continuation_data()->PopPath(); in MKDirpSync()
1366 req_wrap->continuation_data()->MaybeSetFirstPath(next_path); in MKDirpSync()
1367 if (req_wrap->continuation_data()->paths().size() == 0) { in MKDirpSync()
1380 req_wrap->continuation_data()->PushPath(std::move(next_path)); in MKDirpSync()
1381 req_wrap->continuation_data()->PushPath(std::move(dirname)); in MKDirpSync()
1382 } else if (req_wrap->continuation_data()->paths().size() == 0) { in MKDirpSync()
1395 req_wrap->continuation_data()->paths().size() > 0) { in MKDirpSync()
1416 FSReqBase* req_wrap = FSReqBase::from_req(req); in MKDirpAsync() local
1418 if (req_wrap->continuation_data() == nullptr) { in MKDirpAsync()
1419 req_wrap->set_continuation_data( in MKDirpAsync()
1421 req_wrap->continuation_data()->PushPath(std::move(path)); in MKDirpAsync()
1425 std::string next_path = req_wrap->continuation_data()->PopPath(); in MKDirpAsync()
1428 FSReqBase* req_wrap = FSReqBase::from_req(req); in MKDirpAsync() local
1429 Environment* env = req_wrap->env(); in MKDirpAsync()
1439 if (req_wrap->continuation_data()->paths().size() == 0) { in MKDirpAsync()
1440 req_wrap->continuation_data()->MaybeSetFirstPath(path); in MKDirpAsync()
1441 req_wrap->continuation_data()->Done(0); in MKDirpAsync()
1443 req_wrap->continuation_data()->MaybeSetFirstPath(path); in MKDirpAsync()
1446 req_wrap->continuation_data()->mode(), nullptr); in MKDirpAsync()
1453 req_wrap->continuation_data()->Done(err); in MKDirpAsync()
1460 req_wrap->continuation_data()->PushPath(std::move(path)); in MKDirpAsync()
1461 req_wrap->continuation_data()->PushPath(std::move(dirname)); in MKDirpAsync()
1462 } else if (req_wrap->continuation_data()->paths().size() == 0) { in MKDirpAsync()
1468 req_wrap->continuation_data()->mode(), nullptr); in MKDirpAsync()
1477 FSReqBase* req_wrap = FSReqBase::from_req(req); in MKDirpAsync() local
1480 req_wrap->continuation_data()->paths().size() > 0) { in MKDirpAsync()
1482 Environment* env = req_wrap->env(); in MKDirpAsync()
1487 req_wrap->continuation_data()->mode(), nullptr); in MKDirpAsync()
1494 req_wrap->continuation_data()->Done(err); in MKDirpAsync()
1496 if (err < 0) req_wrap->continuation_data()->Done(err); in MKDirpAsync()
1507 FSReqWrapSync* req_wrap, const char* path, int mode) { in CallMKDirpSync() argument
1509 int err = MKDirpSync(env->event_loop(), &req_wrap->req, path, mode, in CallMKDirpSync()