Home
last modified time | relevance | path

Searched refs:sfd (Results 1 - 5 of 5) sorted by relevance

/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/
H A Dread_text.cpp74 OHOS::DistributedFS::FDGuard sfd; in ReadTextAsync() local
89 sfd.SetFD(ret); in ReadTextAsync()
90 if (sfd.GetFD() < 0) { in ReadTextAsync()
94 if (fstat(sfd.GetFD(), &statbf) < 0) { in ReadTextAsync()
95 HILOGE("Failed to get stat of file by fd: %{public}d", sfd.GetFD()); in ReadTextAsync()
113 arg->len = uv_fs_read(nullptr, read_req.get(), sfd.GetFD(), &readbuf, 1, offset, nullptr); in ReadTextAsync()
115 HILOGE("Failed to read file by fd: %{public}d", sfd.GetFD()); in ReadTextAsync()
170 OHOS::DistributedFS::FDGuard sfd; in Sync() local
177 sfd.SetFD(fd); in Sync()
180 if ((!sfd) || (fsta in Sync()
[all...]
H A Dcreate_randomaccessfile.cpp47 OHOS::DistributedFS::FDGuard sfd; in ParseJsFile() local
48 auto fdg = CreateUniquePtr<DistributedFS::FDGuard>(sfd, false); in ParseJsFile()
51 close(sfd); in ParseJsFile()
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/properties/
H A Dread_text.cpp90 FDGuard sfd; in Sync() local
91 sfd.SetFD(open(path.get(), O_RDONLY)); in Sync()
92 if ((!sfd) || (fstat(sfd.GetFD(), &statbf) == -1)) { in Sync()
115 ret = pread(sfd.GetFD(), readbuf.get(), len, position); in Sync()
117 ret = read(sfd.GetFD(), readbuf.get(), len); in Sync()
134 FDGuard sfd; in AsyncExec() local
136 sfd.SetFD(open(path.c_str(), O_RDONLY)); in AsyncExec()
137 if (sfd.GetFD() == -1) { in AsyncExec()
141 if (fstat(sfd in AsyncExec()
[all...]
/foundation/filemanagement/file_api/interfaces/kits/cj/src/
H A Dfile_fs_impl.cpp100 OHOS::DistributedFS::FDGuard sfd; in ParseRandomFile() local
101 auto fdg = CreateUniquePtr<DistributedFS::FDGuard>(sfd, false); in ParseRandomFile()
1148 DistributedFS::FDGuard sfd; in ReadText() local
1155 sfd.SetFD(fd); in ReadText()
1157 if ((!sfd) || (fstat(sfd.GetFD(), &statbf) < 0)) { in ReadText()
1158 HILOGE("Failed to get stat of file by fd: %{public}d", sfd.GetFD()); in ReadText()
1171 int readRet = ReadFromFile(sfd.GetFD(), offset, buffer); in ReadText()
1173 HILOGE("Failed to read file by fd: %{public}d", sfd.GetFD()); in ReadText()
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_file/class_file/
H A Dfile_n_exporter.cpp473 FDGuard sfd; in FileCopy() local
474 sfd.SetFD(open(src.c_str(), O_RDONLY)); in FileCopy()
482 if (sfd.GetFD() == FAILED || ofd.GetFD() == FAILED) { in FileCopy()
486 if (sendfile(ofd.GetFD(), sfd.GetFD(), nullptr, attrSrc.st_size) != FAILED) { in FileCopy()

Completed in 6 milliseconds