/foundation/arkui/ui_lite/frameworks/dfx/ |
H A D | ui_screenshot.cpp | 158 char* destPath = static_cast<char*>(UIMalloc(pathLength + 1)); in ScreenshotToFile() local 159 if (destPath == nullptr) { in ScreenshotToFile() 163 if (memcpy_s(destPath, pathLength + 1, srcPath, pathLength) != EOK) { in ScreenshotToFile() 164 UIFree(reinterpret_cast<void*>(destPath)); in ScreenshotToFile() 167 destPath[pathLength] = '\0'; in ScreenshotToFile() 168 screenshotListener_->SetFilePath(destPath); in ScreenshotToFile()
|
/foundation/filemanagement/file_api/interfaces/kits/cj/src/ |
H A D | copy_dir.cpp | 29 static int RecurCopyDir(const std::string &srcPath, const std::string &destPath, const int mode, 48 static int RemoveFile(const std::string &destPath) in RemoveFile() argument 50 std::filesystem::path destFile(destPath); in RemoveFile() 77 LOGE("Failed to copy file due to existing destPath with throw err"); in CopyFile() 90 static int CopySubDir(const std::string &srcPath, const std::string &destPath, const int mode, in CopySubDir() argument 93 if (!std::filesystem::exists(destPath)) { in CopySubDir() 94 int res = MakeDir(destPath); in CopySubDir() 100 return RecurCopyDir(srcPath, destPath, mode, errfiles); in CopySubDir() 111 static int RecurCopyDir(const std::string &srcPath, const std::string &destPath, const int mode, in RecurCopyDir() argument 125 std::string destTemp = destPath in RecurCopyDir() [all...] |
H A D | copy.cpp | 205 void CopyImpl::CheckOrCreatePath(const std::string &destPath) in CheckOrCreatePath() argument 207 if (!std::filesystem::exists(destPath)) { in CheckOrCreatePath() 208 LOGI("destPath not exist, destPath = %{public}s", destPath.c_str()); in CheckOrCreatePath() 209 auto file = open(destPath.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); in CheckOrCreatePath() 228 int CopyImpl::CopySubDir(const std::string &srcPath, const std::string &destPath, std::shared_ptr<FileInfos> infos) in CopySubDir() argument 230 if (!std::filesystem::exists(destPath)) { in CopySubDir() 231 int res = MakeDir(destPath); in CopySubDir() 239 int newWd = inotify_add_watch(infos->notifyFd, destPath in CopySubDir() 264 RecurCopyDir(const std::string &srcPath, const std::string &destPath, std::shared_ptr<FileInfos> infos) RecurCopyDir() argument [all...] |
H A D | copy.h | 94 std::string destPath; member 149 static void CheckOrCreatePath(const std::string &destPath); 157 static int CopySubDir(const std::string &srcPath, const std::string &destPath, std::shared_ptr<FileInfos> infos); 160 static int RecurCopyDir(const std::string &srcPath, const std::string &destPath, std::shared_ptr<FileInfos> infos);
|
/foundation/bundlemanager/bundle_framework/test/fuzztest/fuzztest_others/zip_fuzzer/ |
H A D | zip_fuzzer.cpp | 35 std::string destPath = ""; in DoSomethingInterestingWithMyAPI() local 42 Zip(srcPath, destPath, options, includeHiddenFiles, zlibCallbackInfo); in DoSomethingInterestingWithMyAPI() 47 Zips(srcFiles, destPath, options, includeHiddenFiles, zlibCallbackInfo); in DoSomethingInterestingWithMyAPI()
|
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/src/ |
H A D | gt_extractor_util.cpp | 204 char *destPath = reinterpret_cast<char *>(UI_Malloc(len)); in HasWrittenFile() local 205 if (destPath == nullptr) { in HasWrittenFile() 206 HILOG_ERROR(HILOG_MODULE_AAFWK, "[BMS] malloc destPath addr fail"); in HasWrittenFile() 209 if (sprintf_s(destPath, len, "%s%s", installPath, path) < 0) { in HasWrittenFile() 210 HILOG_ERROR(HILOG_MODULE_AAFWK, "[BMS] strcat destPath path fail"); in HasWrittenFile() 211 UI_Free(destPath); in HasWrittenFile() 215 if (!BundleUtil::MkDirs(destPath)) { in HasWrittenFile() 216 UI_Free(destPath); in HasWrittenFile() 219 UI_Free(destPath); in HasWrittenFile()
|
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/ |
H A D | copydir.cpp | 35 static int RecurCopyDir(const string &srcPath, const string &destPath, const int mode,
105 static int RemoveFile(const string& destPath)
in RemoveFile() argument 107 filesystem::path destFile(destPath);
in RemoveFile() 135 HILOGE("Failed to copy file due to existing destPath with throw err");
in CopyFile() 151 static int CopySubDir(const string &srcPath, const string &destPath, const int mode,
in CopySubDir() argument 155 if (!filesystem::exists(destPath, errCode) && errCode.value() == ERRNO_NOERR) {
in CopySubDir() 156 int res = MakeDir(destPath);
in CopySubDir() 165 return RecurCopyDir(srcPath, destPath, mode, errfiles);
in CopySubDir() 176 static int RecurCopyDir(const string &srcPath, const string &destPath, const int mode,
in RecurCopyDir() argument 194 string destTemp = destPath in RecurCopyDir() [all...] |
H A D | movedir.cpp | 36 static int RecurMoveDir(const string &srcPath, const string &destPath, const int mode,
161 filesystem::path destPath(dest);
in RenameDir() 163 if (filesystem::exists(destPath, errCode)) {
in RenameDir() 170 filesystem::rename(srcPath, destPath, errCode);
in RenameDir() 173 if (!filesystem::create_directory(destPath, errCode)) {
in RenameDir() 203 static int RecurMoveDir(const string &srcPath, const string &destPath, const int mode,
in RecurMoveDir() argument 206 filesystem::path dpath(destPath);
in RecurMoveDir() 209 errfiles.emplace_front(srcPath, destPath);
in RecurMoveDir() 224 string destTemp = destPath + '/' + string((ptr->namelist[i])->d_name);
in RecurMoveDir() 239 string dest = destPath in RecurMoveDir() [all...] |
H A D | copy.cpp | 235 int Copy::CheckOrCreatePath(const std::string &destPath) in CheckOrCreatePath() argument 238 if (!filesystem::exists(destPath, errCode) && errCode.value() == ERRNO_NOERR) { in CheckOrCreatePath() 239 HILOGI("destPath not exist"); in CheckOrCreatePath() 240 auto file = open(destPath.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); in CheckOrCreatePath() 288 int Copy::CopySubDir(const string &srcPath, const string &destPath, std::shared_ptr<FileInfos> infos) in CopySubDir() argument 291 if (!filesystem::exists(destPath, errCode) && errCode.value() == ERRNO_NOERR) { in CopySubDir() 292 int res = MakeDir(destPath); in CopySubDir() 303 int newWd = inotify_add_watch(infos->notifyFd, destPath.c_str(), watchEvents); in CopySubDir() 316 receiveInfo->path = destPath; in CopySubDir() 318 HILOGE("Failed to find infos, srcPath = %{public}s, destPath in CopySubDir() 398 RecurCopyDir(const string &srcPath, const string &destPath, std::shared_ptr<FileInfos> infos) RecurCopyDir() argument [all...] |
H A D | copy.h | 83 std::string destPath; member 133 static int CheckOrCreatePath(const std::string &destPath); 152 static int RecurCopyDir(const string &srcPath, const string &destPath, std::shared_ptr<FileInfos> infos); 157 static int CopySubDir(const string &srcPath, const string &destPath, std::shared_ptr<FileInfos> infos);
|
/foundation/multimedia/media_library/frameworks/native/c_api/media_asset_manger_capi/ |
H A D | media_asset_manager_capi.cpp | 54 MediaLibrary_RequestOptions requestOptions, const char* destPath, OH_MediaLibrary_OnDataPrepared callback) in OH_MediaAssetManager_RequestImageForPath() 64 CHECK_AND_RETURN_RET_LOG(destPath != nullptr, requestId, "destPath is null"); in OH_MediaAssetManager_RequestImageForPath() 71 std::string requestIdStr = managerObj->manager_->NativeRequestImage(uri, nativeRequestOptions, destPath, in OH_MediaAssetManager_RequestImageForPath() 78 MediaLibrary_RequestOptions requestOptions, const char* destPath, OH_MediaLibrary_OnDataPrepared callback) in OH_MediaAssetManager_RequestVideoForPath() 88 CHECK_AND_RETURN_RET_LOG(destPath != nullptr, requestId, "destPath is null"); in OH_MediaAssetManager_RequestVideoForPath() 95 std::string requestIdStr = managerObj->manager_->NativeRequestVideo(uri, nativeRequestOptions, destPath, in OH_MediaAssetManager_RequestVideoForPath() 53 OH_MediaAssetManager_RequestImageForPath(OH_MediaAssetManager* manager, const char* uri, MediaLibrary_RequestOptions requestOptions, const char* destPath, OH_MediaLibrary_OnDataPrepared callback) OH_MediaAssetManager_RequestImageForPath() argument 77 OH_MediaAssetManager_RequestVideoForPath(OH_MediaAssetManager* manager, const char* uri, MediaLibrary_RequestOptions requestOptions, const char* destPath, OH_MediaLibrary_OnDataPrepared callback) OH_MediaAssetManager_RequestVideoForPath() argument
|
/foundation/multimedia/media_library/interfaces/inner_api/media_library_helper/include/ |
H A D | media_asset_manager_impl.h | 34 const char* destPath, const NativeOnDataPrepared &callback) override; 36 const char* destPath, const NativeOnDataPrepared &callback) override; 53 static int32_t WriteFileToPath(const std::string &srcUri, const std::string &destPath, bool isSource);
|
/foundation/multimedia/media_library/interfaces/kits/c/ |
H A D | media_asset_manager_capi.h | 65 * @param destPath Destination address of the requested resource. 71 MediaLibrary_RequestOptions requestOptions, const char* destPath, OH_MediaLibrary_OnDataPrepared callback); 80 * @param destPath Destination address of the requested resource. 86 MediaLibrary_RequestOptions requestOptions, const char* destPath, OH_MediaLibrary_OnDataPrepared callback);
|
/foundation/bundlemanager/bundle_framework/interfaces/kits/js/zip/src/ |
H A D | zip.cpp | 371 FilePath destPath = destFile; in ZipWithFilterCallback() local 372 if (!FilePath::DirectoryExists(destPath.DirName())) { in ZipWithFilterCallback() 373 APP_LOGE("The destPath not exist"); in ZipWithFilterCallback() 376 if (!FilePath::PathIsWriteable(destPath.DirName())) { in ZipWithFilterCallback() 377 APP_LOGE("The destPath not writeable"); in ZipWithFilterCallback() 392 ZipParams params(srcFile, FilePath(destPath.CheckDestDirTail())); in ZipWithFilterCallback() 405 FilePath destPath = destFile; in ZipsWithFilterCallback() local 406 if (!FilePath::DirectoryExists(destPath.DirName())) { in ZipsWithFilterCallback() 407 APP_LOGE("The destPath not exist"); in ZipsWithFilterCallback() 410 if (!FilePath::PathIsWriteable(destPath in ZipsWithFilterCallback() 437 Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS &options, bool includeHiddenFiles, std::shared_ptr<ZlibCallbackInfo> zlibCallbackInfo) Zip() argument 540 Zips(const std::vector<std::string> &srcFiles, const std::string &destPath, const OPTIONS &options, bool includeHiddenFiles, std::shared_ptr<ZlibCallbackInfo> zlibCallbackInfo) Zips() argument [all...] |
/foundation/multimedia/ringtone_library/services/ringtone_restore/src/ |
H A D | ringtone_restore.cpp | 157 bool RingtoneRestore::OnPrepare(FileInfo &info, const std::string &destPath) in OnPrepare() argument 159 if (!RingtoneFileUtils::IsFileExists(destPath)) { in OnPrepare() 177 info.restorePath = destPath + "/" + fileName; in OnPrepare() 185 info.restorePath = destPath + "/" + baseName + "(" + to_string(repeatCount++) + ")" + "." + extensionName; in OnPrepare()
|
/foundation/bundlemanager/bundle_framework/interfaces/kits/cj/src/ |
H A D | cj_zip.cpp | 172 FilePath destPath = destFile; in ZipWithFilterCallback() local 173 if (!FilePath::DirectoryExists(destPath.DirName())) { in ZipWithFilterCallback() 174 APP_LOGE("The destPath not exist."); in ZipWithFilterCallback() 177 if (!FilePath::PathIsWriteable(destPath.DirName())) { in ZipWithFilterCallback() 178 APP_LOGE("The destPath not writeable."); in ZipWithFilterCallback() 193 ZipParams params(srcFile, FilePath(destPath.CheckDestDirTail())); in ZipWithFilterCallback() 203 int32_t Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS &options) in Zip() argument 206 FilePath destFile(destPath); in Zip()
|
H A D | cj_zip.h | 23 int32_t Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS &options);
|
/foundation/multimedia/media_library/frameworks/native/c_api/ |
H A D | moving_photo_impl.cpp | 146 std::string destPath = fileUri.GetRealPath(); in WriteToSandboxUri() local 147 MEDIA_INFO_LOG("Dest real path = %{public}s", destPath.c_str()); in WriteToSandboxUri() 148 if (!MediaFileUtils::IsFileExists(destPath) && !MediaFileUtils::CreateFile(destPath)) { in WriteToSandboxUri() 149 MEDIA_ERR_LOG("Create empty dest file in sandbox failed, path:%{public}s", destPath.c_str()); in WriteToSandboxUri() 153 int32_t destFd = MediaFileUtils::OpenFile(destPath, MEDIA_FILEMODE_READWRITE); in WriteToSandboxUri()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/ndk/ndkpath_fuzzer/ |
H A D | path_fuzzer.cpp | 206 OH_Drawing_Path* destPath = OH_Drawing_PathCreate(); in NativeDrawingPathTest004() local 211 OH_Drawing_PathAddPath(destPath, nullptr, matrix); in NativeDrawingPathTest004() 212 OH_Drawing_PathAddPath(destPath, path, nullptr); in NativeDrawingPathTest004() 213 OH_Drawing_PathAddPath(destPath, path, matrix); in NativeDrawingPathTest004() 217 OH_Drawing_PathAddPathWithMatrixAndMode(destPath, nullptr, matrix, in NativeDrawingPathTest004() 219 OH_Drawing_PathAddPathWithMatrixAndMode(destPath, path, nullptr, in NativeDrawingPathTest004() 221 OH_Drawing_PathAddPathWithMatrixAndMode(destPath, path, matrix, in NativeDrawingPathTest004() 225 OH_Drawing_PathDestroy(destPath); in NativeDrawingPathTest004()
|
/foundation/bundlemanager/bundle_framework/interfaces/kits/js/zip/include/ |
H A D | zip.h | 150 bool Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS &options, 160 bool Zips(const std::vector<std::string> &srcFiles, const std::string &destPath, const OPTIONS &options,
|
/foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/src/extend_resource/ |
H A D | extend_resource_manager_proxy.cpp | 322 std::string destPath; in CopyFiles() local 323 auto ret = CreateFd(fileName, destFd, destPath); in CopyFiles() 324 if ((ret != ERR_OK) || (destFd < 0) || (destPath.empty())) { in CopyFiles() 339 destFiles.emplace_back(destPath); in CopyFiles()
|
/foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/src/quick_fix/ |
H A D | quick_fix_manager_proxy.cpp | 237 std::string destPath; in CopyFiles() local 238 auto ret = CreateFd(fileName, destFd, destPath); in CopyFiles() 239 if ((ret != ERR_OK) || (destFd < 0) || (destPath.empty())) { in CopyFiles() 254 destFiles.emplace_back(destPath); in CopyFiles()
|
/foundation/multimedia/ringtone_library/services/ringtone_restore/include/ |
H A D | ringtone_restore.h | 33 virtual bool OnPrepare(FileInfo &info, const std::string &destPath) override;
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/media_library_asset_manager_test/src/ |
H A D | media_library_asset_manager_test.cpp | 272 string destPath = destFileUri.GetRealPath(); in HWTEST_F() local 273 int destFd = MediaFileUtils::OpenFile(destPath, MEDIA_FILEMODE_READWRITE); in HWTEST_F() 320 string destPath = destFileUri.GetRealPath(); in HWTEST_F() local 321 int destFd = MediaFileUtils::OpenFile(destPath, MEDIA_FILEMODE_READWRITE); in HWTEST_F() 368 string destPath = destFileUri.GetRealPath(); in HWTEST_F() local 369 int destFd = MediaFileUtils::OpenFile(destPath, MEDIA_FILEMODE_READWRITE); in HWTEST_F() 440 string destPath = destFileUri.GetRealPath(); in HWTEST_F() local 441 int destFd = MediaFileUtils::OpenFile(destPath, MEDIA_FILEMODE_READWRITE); in HWTEST_F()
|
/foundation/bundlemanager/bundle_framework/services/bundlemgr/include/installd/ |
H A D | installd_operator.h | 223 static bool CopyFileFast(const std::string &sourcePath, const std::string &destPath); 266 static bool MoveFileOrDir(const std::string &srcPath, const std::string &destPath, mode_t mode); 268 static bool MoveFile(const std::string &srcPath, const std::string &destPath);
|