/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_scanner_db_test/src/ |
H A D | medialibrary_scanner_db_test.cpp | 128 struct stat statInfo; in HWTEST_F() local 133 metadata.SetFileSize(statInfo.st_size); in HWTEST_F() 134 metadata.SetFileDateModified(statInfo.st_mtime); in HWTEST_F() 154 struct stat statInfo; in HWTEST_F() local 159 metadata.SetFileSize(statInfo.st_size); in HWTEST_F() 160 metadata.SetFileDateModified(statInfo.st_mtime); in HWTEST_F() 203 struct stat statInfo; in HWTEST_F() local 208 metadata.SetFileSize(statInfo.st_size); in HWTEST_F() 209 metadata.SetFileDateModified(statInfo.st_mtime); in HWTEST_F() 283 struct stat statInfo; in HWTEST_F() local 310 struct stat statInfo; HWTEST_F() local [all...] |
/foundation/multimedia/ringtone_library/services/ringtone_scanner/src/ |
H A D | ringtone_scanner.cpp | 329 struct stat statInfo; in WalkFileTree() local 357 if (lstat(fName, &statInfo) == -1) { in WalkFileTree() 361 if (S_ISDIR(statInfo.st_mode)) { in WalkFileTree() 418 struct stat statInfo = { 0 }; in GetFileMetadata() local 419 if (stat(path_.c_str(), &statInfo) != 0) { in GetFileMetadata() 426 errCode = BuildVibrateData(statInfo); in GetFileMetadata() 431 errCode = BuildData(statInfo); in GetFileMetadata() 486 int32_t RingtoneScannerObj::BuildData(const struct stat &statInfo) in BuildData() argument 494 if (S_ISDIR(statInfo.st_mode)) { in BuildData() 520 data_->SetSize(statInfo in BuildData() 533 BuildVibrateData(const struct stat &statInfo) BuildVibrateData() argument [all...] |
H A D | ringtone_scanner_utils.cpp | 28 struct stat statInfo {}; in IsExists() struct 35 return ((stat(path.c_str(), &statInfo)) == ERR_SUCCESS); in IsExists()
|
/foundation/multimedia/media_library/frameworks/services/media_scanner/src/scanner/ |
H A D | media_scanner.cpp | 438 struct stat statInfo {}; in GetFileInfo() struct 439 if (stat(path.c_str(), &statInfo) != E_OK) { in GetFileInfo() 443 size = statInfo.st_size; in GetFileInfo() 444 dateModified = MediaFileUtils::Timespec2Millisecond(statInfo.st_mtim); in GetFileInfo() 464 static bool IsFileNotChanged(const unique_ptr<Metadata> &data, const struct stat &statInfo) in IsFileNotChanged() argument 468 int64_t currentDateModified = MediaFileUtils::Timespec2Millisecond(statInfo.st_mtim); in IsFileNotChanged() 469 int64_t currentSize = statInfo.st_size; in IsFileNotChanged() 477 int32_t MediaScannerObj::BuildData(const struct stat &statInfo) in BuildData() argument 488 if (S_ISDIR(statInfo.st_mode)) { in BuildData() 510 if (IsFileNotChanged(data_, statInfo) in BuildData() 547 struct stat statInfo = { 0 }; GetFileMetadata() local 701 struct stat statInfo; InsertOrUpdateAlbumInfo() local 811 struct stat statInfo; WalkFileTree() local [all...] |
H A D | scanner_utils.cpp | 33 struct stat statInfo {}; in IsExists() struct 40 return ((stat(path.c_str(), &statInfo)) == ERR_SUCCESS); in IsExists()
|
/foundation/multimedia/media_library/frameworks/services/media_backup_extension/src/ |
H A D | backup_file_utils.cpp | 152 struct stat statInfo {}; in GetFileMetadata() struct 153 if (stat(path.c_str(), &statInfo) != 0) { in GetFileMetadata() 157 data->SetFileSize(statInfo.st_size); in GetFileMetadata() 158 auto dateModified = static_cast<int64_t>(MediaFileUtils::Timespec2Millisecond(statInfo.st_mtim)); in GetFileMetadata() 383 struct stat statInfo {}; in IsLowQualityImage() struct 386 MEDIA_ERR_LOG("Invalid file (%{public}s), get statInfo failed, err: %{public}d", garbledFilePath.c_str(), in IsLowQualityImage() 391 if (stat(realPath.c_str(), &statInfo) == E_SUCCESS) { in IsLowQualityImage() 398 if (statInfo.st_mode & S_IFDIR) { in IsLowQualityImage() 402 if (statInfo.st_size <= 0) { in IsLowQualityImage() 404 (long long)statInfo in IsLowQualityImage() 414 struct stat statInfo {}; IsFileValid() struct [all...] |
H A D | others_clone_restore.cpp | 230 void OthersCloneRestore::SetFileInfosInCurrentDir(const std::string &file, struct stat &statInfo) in SetFileInfosInCurrentDir() argument 237 tmpInfo.fileSize = statInfo.st_size; in SetFileInfosInCurrentDir() 238 tmpInfo.dateModified = MediaFileUtils::Timespec2Millisecond(statInfo.st_mtim); in SetFileInfosInCurrentDir() 314 struct stat statInfo; in GetAllfilesInCurrentDir() local 342 if (lstat(fName, &statInfo) == -1) { in GetAllfilesInCurrentDir() 347 if (S_ISDIR(statInfo.st_mode)) { in GetAllfilesInCurrentDir() 349 } else if (S_ISREG(statInfo.st_mode)) { in GetAllfilesInCurrentDir() 350 SetFileInfosInCurrentDir(fName, statInfo); in GetAllfilesInCurrentDir()
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/ |
H A D | medialibrary_formmap_operations.cpp | 68 struct stat statInfo; in ReadThumbnailFile() local 69 if (fstat(uniqueFd.Get(), &statInfo) == E_ERR) { in ReadThumbnailFile() 72 buffer.reserve(statInfo.st_size); in ReadThumbnailFile() 73 uint8_t *tempBuffer = (uint8_t *)malloc(statInfo.st_size); in ReadThumbnailFile() 78 ssize_t bytes = read(uniqueFd.Get(), tempBuffer, statInfo.st_size); in ReadThumbnailFile() 84 buffer.assign(tempBuffer, tempBuffer + statInfo.st_size); in ReadThumbnailFile()
|
H A D | medialibrary_object_utils.cpp | 162 struct stat statInfo {}; in InsertFileInDb() struct 163 if (stat(fileAsset.GetPath().c_str(), &statInfo) == 0) { in InsertFileInDb() 164 assetInfo.PutLong(MEDIA_DATA_DB_SIZE, statInfo.st_size); in InsertFileInDb() 166 assetInfo.PutLong(MEDIA_DATA_DB_DATE_MODIFIED, MediaFileUtils::Timespec2Millisecond(statInfo.st_mtim)); in InsertFileInDb() 367 struct stat statInfo {}; in SetDirValuesByPath() struct 368 if (stat(path.c_str(), &statInfo) == 0) { in SetDirValuesByPath() 369 values.PutLong(MEDIA_DATA_DB_SIZE, statInfo.st_size); in SetDirValuesByPath() 370 if (statInfo.st_mtime == 0) { in SetDirValuesByPath() 373 values.PutLong(MEDIA_DATA_DB_DATE_MODIFIED, MediaFileUtils::Timespec2Millisecond(statInfo.st_mtim)); in SetDirValuesByPath() 1110 struct stat statInfo; in UpdateFileInfoInDb() local [all...] |
H A D | background_cloud_file_processor.cpp | 452 struct stat statInfo {}; in GetSizeAndMimeType() struct 453 if (stat(path.c_str(), &statInfo) != 0) { in GetSizeAndMimeType() 457 metadata->SetFileSize(statInfo.st_size); in GetSizeAndMimeType()
|
H A D | medialibrary_subscriber.cpp | 173 struct stat statInfo {}; in UploadDBFile() struct 174 if (stat(dbPath.c_str(), &statInfo) != 0) { in UploadDBFile() 177 totalFileSize += statInfo.st_size; in UploadDBFile()
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/ |
H A D | media_file_utils.cpp | 253 struct stat statInfo {}; in PrintStatInformation() struct 254 if ((stat(path.c_str(), &statInfo)) == E_SUCCESS) { in PrintStatInformation() 256 DesensitizePath(path).c_str(), statInfo.st_uid, statInfo.st_gid, statInfo.st_mode); in PrintStatInformation() 310 struct stat statInfo {}; in IsFileExists() struct 312 return ((stat(fileName.c_str(), &statInfo)) == E_SUCCESS); in IsFileExists() 317 struct stat statInfo {}; in IsFileValid() struct 319 if (stat(fileName.c_str(), &statInfo) == E_SUCCESS) { in IsFileValid() 321 if (statInfo in IsFileValid() 376 struct stat statInfo {}; IsDirectory() struct 1018 struct stat statInfo {}; global() struct [all...] |
/foundation/multimedia/ringtone_library/services/ringtone_restore/src/ |
H A D | ringtone_restore.cpp | 149 struct stat statInfo; in UpdateRestoreFileInfo() local 150 if (stat(info.restorePath.c_str(), &statInfo) != 0) { in UpdateRestoreFileInfo() 154 info.dateModified = static_cast<int64_t>(RingtoneFileUtils::Timespec2Millisecond(statInfo.st_mtim)); in UpdateRestoreFileInfo()
|
H A D | ringtone_dualfwk_restore.cpp | 437 struct stat statInfo; in UpdateRestoreFileInfo() local 438 if (stat(info.restorePath.c_str(), &statInfo) != 0) { in UpdateRestoreFileInfo() 442 info.dateModified = static_cast<int64_t>(RingtoneFileUtils::Timespec2Millisecond(statInfo.st_mtim)); in UpdateRestoreFileInfo()
|
/foundation/multimedia/ringtone_library/test/unittest/ringtone_scanner_test/src/ |
H A D | ringtone_scanner_db_test.cpp | 98 struct stat statInfo; in HWTEST_F() local 103 metadata.SetSize(statInfo.st_size); in HWTEST_F() 104 metadata.SetDateModified(statInfo.st_mtime); in HWTEST_F()
|
/foundation/multimedia/ringtone_library/services/ringtone_scanner/include/ |
H A D | ringtone_scanner.h | 72 EXPORT int32_t BuildData(const struct stat &statInfo); 73 EXPORT int32_t BuildVibrateData(const struct stat &statInfo);
|
/foundation/filemanagement/storage_service/services/storage_daemon/mtpfs/src/ |
H A D | mtpfs_fuse.cpp | 129 int WrapStatfs(const char *path, struct statvfs *statInfo) in WrapStatfs() argument 132 int ret = DelayedSingleton<MtpFileSystem>::GetInstance()->Statfs(path, statInfo); in WrapStatfs() 792 int MtpFileSystem::Statfs(const char *path, struct statvfs *statInfo) in Statfs() argument 796 statInfo->f_bsize = static_cast<unsigned long>(bs); in Statfs() 797 statInfo->f_frsize = static_cast<unsigned long>(bs); in Statfs() 798 statInfo->f_blocks = device_.StorageTotalSize() / bs; in Statfs() 799 statInfo->f_bavail = device_.StorageFreeSize() / bs; in Statfs() 800 statInfo->f_bfree = statInfo->f_bavail; in Statfs()
|
/foundation/filemanagement/dfs_service/services/clouddisk_database/src/ |
H A D | clouddisk_rdbstore.cpp | 360 struct stat *statInfo) in CreateFile() 362 int32_t ret = stat(filePath.c_str(), statInfo); in CreateFile() 368 fileInfo.PutLong(FileColumn::FILE_SIZE, statInfo->st_size); in CreateFile() 369 fileInfo.PutLong(FileColumn::FILE_TIME_EDITED, CloudFileUtils::Timespec2Milliseconds(statInfo->st_mtim)); in CreateFile() 370 fileInfo.PutLong(FileColumn::META_TIME_EDITED, CloudFileUtils::Timespec2Milliseconds(statInfo->st_mtim)); in CreateFile() 397 static void UpdateMetabase(MetaBase &metaBase, int64_t fileTimeAdded, struct stat *statInfo) in UpdateMetabase() argument 400 metaBase.mtime = static_cast<uint64_t>(CloudFileUtils::Timespec2Milliseconds(statInfo->st_mtim)); in UpdateMetabase() 401 metaBase.mode = statInfo->st_mode; in UpdateMetabase() 402 metaBase.size = static_cast<uint64_t>(statInfo->st_size); in UpdateMetabase() 445 struct stat statInfo {}; in Create() struct 359 CreateFile(const std::string &fileName, const std::string &filePath, ValuesBucket &fileInfo, struct stat *statInfo) CreateFile() argument 539 HandleWriteValue(ValuesBucket &write, int32_t position, struct stat &statInfo) HandleWriteValue() argument 580 struct stat statInfo {}; Write() struct [all...] |
/foundation/multimedia/media_library/frameworks/services/media_dfx/src/ |
H A D | dfx_database_utils.cpp | 166 struct stat statInfo {}; in QueryPhotoRecordInfo() struct 167 if (stat(dbPath.c_str(), &statInfo) != 0) { in QueryPhotoRecordInfo() 171 photoRecordInfo.dbFileSize = statInfo.st_size; in QueryPhotoRecordInfo()
|
/foundation/multimedia/ringtone_library/services/utils/src/ |
H A D | ringtone_file_utils.cpp | 240 struct stat statInfo {}; in IsDirectory() struct 242 if (stat(dirName.c_str(), &statInfo) == 0) { in IsDirectory() 243 if (statInfo.st_mode & S_IFDIR) { in IsDirectory() 365 struct stat statInfo {}; in IsFileExists() struct 367 return ((stat(fileName.c_str(), &statInfo)) == 0); in IsFileExists()
|
/foundation/multimedia/media_library/frameworks/services/media_multistages_capture/src/utils/ |
H A D | file_utils.cpp | 55 struct stat statInfo {};
in IsFileExist() struct 56 return ((stat(fileName.c_str(), &statInfo)) == E_SUCCESS);
in IsFileExist()
|
/foundation/filemanagement/storage_service/services/storage_daemon/mtpfs/include/ |
H A D | mtpfs_fuse.h | 74 int Statfs(const char *path, struct statvfs *statInfo);
|
/foundation/multimedia/media_library/frameworks/services/media_backup_extension/include/ |
H A D | others_clone_restore.h | 56 void SetFileInfosInCurrentDir(const std::string &file, struct stat &statInfo);
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_unittest_utils/src/ |
H A D | medialibrary_unittest_utils.cpp | 121 struct stat statInfo {}; in IsFileExists() struct 122 int errCode = stat(filePath.c_str(), &statInfo); in IsFileExists()
|
/foundation/multimedia/media_library/frameworks/services/media_scanner/include/scanner/ |
H A D | media_scanner.h | 100 int32_t BuildData(const struct stat &statInfo);
|