Home
last modified time | relevance | path

Searched refs:statbuf (Results 1 - 25 of 28) sorted by relevance

12

/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/
H A Dnstackx_util.c27 struct stat statbuf; in GetTargetFileSize() local
34 if (stat(dir, &statbuf) != 0 || statbuf.st_size < 0) { in GetTargetFileSize()
39 *size = (uint64_t)statbuf.st_size; in GetTargetFileSize()
109 struct stat statbuf; in IsAccessiblePath() local
114 if (stat(pathName, &statbuf) != 0) { in IsAccessiblePath()
118 if (((statbuf.st_mode) & S_IFMT) != fileType) { in IsAccessiblePath()
/foundation/multimodalinput/input/intention/services/device_manager/src/
H A Denumerator.cpp56 struct stat statbuf; in ScanAndAddDevices() local
58 if (stat(devPath.c_str(), &statbuf) != 0) { in ScanAndAddDevices()
61 if (!S_ISCHR(statbuf.st_mode)) { in ScanAndAddDevices()
H A Ddevice_manager.cpp177 struct stat statbuf; in AddDevice() local
179 if (stat(devPath.c_str(), &statbuf) != 0) { in AddDevice()
183 if (!S_ISCHR(statbuf.st_mode)) { in AddDevice()
/foundation/graphic/graphic_2d/rosen/samples/2d_graphics/
H A Ddrawing_sample_replayer.cpp53 struct stat statbuf; in ReadCmds() local
54 if (fstat(fd.Get(), &statbuf) < 0) { in ReadCmds()
57 auto mapFile = static_cast<uint8_t*>(mmap(nullptr, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)); in ReadCmds()
62 if (!messageParcel.ParseFrom(reinterpret_cast<uintptr_t>(mapFile), statbuf.st_size)) { in ReadCmds()
63 munmap(mapFile, statbuf.st_size); in ReadCmds()
71 munmap(mapFile, statbuf.st_size); in ReadCmds()
74 munmap(mapFile, statbuf.st_size); in ReadCmds()
/foundation/filemanagement/file_api/interfaces/kits/cj/src/
H A Dmove_file.cpp69 double atime = static_cast<double>(statReq->statbuf.st_atim.tv_sec) + in ChangeTime()
70 static_cast<double>(statReq->statbuf.st_atim.tv_nsec) / NS; in ChangeTime()
71 double mtime = static_cast<double>(statReq->statbuf.st_mtim.tv_sec) + in ChangeTime()
72 static_cast<double>(statReq->statbuf.st_mtim.tv_nsec) / NS; in ChangeTime()
H A Dfile_fs_impl.cpp83 uv_stat_t* tempBuf = new (std::nothrow) uv_stat_t(stat_req->statbuf); in GetUvStat()
223 auto nativeStat = FFIData::Create<StatImpl>(lstat_req->statbuf); in Lstat()
453 double atime = static_cast<double>(stat_req->statbuf.st_atim.tv_sec) + in RestoreTime()
454 static_cast<double>(stat_req->statbuf.st_atim.tv_nsec) / NS; in RestoreTime()
455 double mtime = static_cast<double>(stat_req->statbuf.st_mtim.tv_sec) + in RestoreTime()
456 static_cast<double>(stat_req->statbuf.st_mtim.tv_nsec) / NS; in RestoreTime()
1065 offset = static_cast<int64_t>(stat_req->statbuf.st_size); in GetFileSize()
1214 double atime = static_cast<double>(stat_req->statbuf.st_atim.tv_sec) + in Utimes()
1215 static_cast<double>(stat_req->statbuf.st_atim.tv_nsec) / NS; in Utimes()
/foundation/graphic/graphic_2d/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/
H A Ddrawing_playback.cpp480 struct stat statbuf; in LoadDrawCmdList() local
481 if (fstat(fd.Get(), &statbuf) < 0) { in LoadDrawCmdList()
484 std::cout << "statbuf.st_size = " << statbuf.st_size << std::endl; in LoadDrawCmdList()
486 auto mapFile = static_cast<uint8_t *>(mmap(nullptr, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)); in LoadDrawCmdList()
492 MessageParcel messageParcel(new MyAllocator(fd.Get(), statbuf.st_size, mapFile)); in LoadDrawCmdList()
494 if (!messageParcel.ParseFrom(reinterpret_cast<uintptr_t>(mapFile), statbuf.st_size)) { in LoadDrawCmdList()
495 munmap(mapFile, statbuf.st_size); in LoadDrawCmdList()
505 munmap(mapFile, statbuf.st_size); in LoadDrawCmdList()
511 munmap(mapFile, statbuf in LoadDrawCmdList()
[all...]
/foundation/multimedia/player_framework/frameworks/native/system_sound_manager/system_sound_vibrator/
H A Dsystem_sound_vibrator.cpp92 struct stat64 statbuf = { 0 }; in StartVibratorForSystemTone() local
93 if (fstat64(fd, &statbuf) != 0) { in StartVibratorForSystemTone()
99 result = Sensors::PlayVibratorCustom(fd, 0, statbuf.st_size); in StartVibratorForSystemTone()
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/
H A Dutimes.cpp75 double atime = static_cast<double>(stat_req->statbuf.st_atim.tv_sec) + in Sync()
76 static_cast<double>(stat_req->statbuf.st_atim.tv_nsec) / NS; in Sync()
H A Dstat.cpp107 auto stat = CommonFunc::InstantiateStat(env, stat_req->statbuf, arg).val_; in Sync()
109 auto stat = CommonFunc::InstantiateStat(env, stat_req->statbuf).val_; in Sync()
143 arg->stat_ = stat_req->statbuf; in Async()
H A Dlstat.cpp60 auto stat = CommonFunc::InstantiateStat(env, lstat_req->statbuf).val_; in Sync()
77 arg->stat_ = lstat_req->statbuf; in LstatExec()
H A Dread_lines.cpp61 offset = static_cast<int64_t>(stat_req->statbuf.st_size); in GetFileSize()
/foundation/multimodalinput/input/service/event_dump/src/
H A Devent_statistic.cpp112 struct stat statbuf; in WriteEventFile() local
114 if (stat(EVENT_FILE_NAME.c_str(), &statbuf) == FUNC_EXE_OK) { in WriteEventFile()
115 fileSize = static_cast<int32_t>(statbuf.st_size); in WriteEventFile()
/foundation/ability/ability_runtime/frameworks/native/ability/native/recovery/
H A Dability_recovery.cpp205 struct stat statbuf; in ReadSerializeDataFromFile() local
206 if (fstat(fd, &statbuf) < 0) { in ReadSerializeDataFromFile()
212 auto mapFile = static_cast<uint8_t*>(mmap(NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)); in ReadSerializeDataFromFile()
220 if (!parcel.ParseFrom(reinterpret_cast<uintptr_t>(mapFile), statbuf.st_size)) { in ReadSerializeDataFromFile()
221 munmap(mapFile, statbuf.st_size); in ReadSerializeDataFromFile()
232 munmap(mapFile, statbuf.st_size); in ReadSerializeDataFromFile()
238 munmap(mapFile, statbuf.st_size); in ReadSerializeDataFromFile()
/foundation/graphic/graphic_2d/rosen/modules/platform/utils/
H A Ddirectory_ex.cpp222 struct stat statbuf = {0}; in GetFolderSize() local
226 if (stat(file.c_str(), &statbuf) == 0) { in GetFolderSize()
227 totalSize += statbuf.st_size; in GetFolderSize()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_unittest_utils/src/
H A Dmedialibrary_unittest_utils.cpp331 struct stat statbuf; in writeBytesToFile() local
332 if (lstat(path, &statbuf) == -1) { in writeBytesToFile()
337 resultFileSize = statbuf.st_size; in writeBytesToFile()
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/utils/src/
H A Dimage_utils.cpp104 struct stat statbuf; in GetFileSize() local
105 int ret = stat(pathName.c_str(), &statbuf); in GetFileSize()
110 size = statbuf.st_size; in GetFileSize()
116 struct stat statbuf; in GetFileSize() local
122 int ret = fstat(fd, &statbuf); in GetFileSize()
127 size = statbuf.st_size; in GetFileSize()
/foundation/filemanagement/storage_service/services/storage_daemon/utils/
H A Dfile_utils.cpp576 struct stat statbuf; in DeleteFile() local
577 lstat(path.c_str(), &statbuf); in DeleteFile()
579 if (S_ISREG(statbuf.st_mode)) { in DeleteFile()
581 } else if (S_ISDIR(statbuf.st_mode)) { in DeleteFile()
/foundation/ability/ability_runtime/services/abilitymgr/src/mission/
H A Dmission_data_storage.cpp331 struct stat statbuf; in ReadFileToBuffer() local
332 int ret = stat(filePath.c_str(), &statbuf); in ReadFileToBuffer()
337 bufferSize = static_cast<size_t>(statbuf.st_size); in ReadFileToBuffer()
/foundation/multimedia/player_framework/frameworks/native/audio_haptic/
H A Daudio_haptic_vibrator_impl.cpp123 struct stat64 statbuf = { 0 }; in OpenHapticFile() local
124 if (fstat64(fd, &statbuf) == 0) { in OpenHapticFile()
127 vibratorFD_->length = statbuf.st_size; in OpenHapticFile()
/foundation/filemanagement/storage_service/services/storage_daemon/volume/src/
H A Dexternal_volume_info.cpp174 struct stat statbuf; in DoMount() local
176 if (!lstat(mountPath_.c_str(), &statbuf)) { in DoMount()
/foundation/ability/ability_runtime/frameworks/native/runtime/
H A Djs_worker.cpp287 struct stat statbuf; in GetSafeData() local
288 if (fstat(fd, &statbuf) < 0) { in GetSafeData()
302 auto result = fileMapper->CreateFileMapper(resolvedPath, false, fd, 0, statbuf.st_size, FileMapperType::SAFE_ABC); in GetSafeData()
/foundation/multimodalinput/input/util/common/src/
H A Dutil.cpp250 struct stat statbuf = { 0 }; in GetFileSize() local
251 if (stat(filePath.c_str(), &statbuf) != 0) { in GetFileSize()
255 return statbuf.st_size; in GetFileSize()
/foundation/multimodalinput/input/tools/vuinput/src/
H A Dvirtual_device.cpp553 struct stat statbuf = { 0 }; in GetFileSize() local
554 if (stat(filePath.c_str(), &statbuf) != 0) { in GetFileSize()
558 return statbuf.st_size; in GetFileSize()
/foundation/distributedhardware/distributed_audio/services/test_example/
H A Ddistributedaudiotest.cpp378 struct stat statbuf; in StartRender() local
379 stat(SPK_FILE_PATH, &statbuf); in StartRender()
380 int32_t size = statbuf.st_size; in StartRender()

Completed in 19 milliseconds

12