Home
last modified time | relevance | path

Searched refs:oldPath (Results 1 - 25 of 48) sorted by relevance

12

/foundation/filemanagement/storage_service/services/storage_daemon/mtpfs/src/
H A Dmtpfs_mtp_device.cpp331 int MtpFsDevice::DirReName(const std::string &oldPath, const std::string &newPath) in DirReName() argument
333 const std::string tmpOldBaseName(SmtpfsBaseName(oldPath)); in DirReName()
334 const std::string tmpOldDirName(SmtpfsDirName(oldPath)); in DirReName()
344 LOGE("Can not move %{public}s to %{public}s", oldPath.c_str(), newPath.c_str()); in DirReName()
355 LOGE("Could not rename %{public}s to %{public}s", oldPath.c_str(), tmpNewBaseName.c_str()); in DirReName()
361 LOGI("Directory %{public}s renamed to %{public}s", oldPath.c_str(), tmpNewBaseName.c_str()); in DirReName()
365 int MtpFsDevice::ReNameInner(const std::string &oldPath, const std::string &newPath) in ReNameInner() argument
367 const std::string tmpOldBaseName(SmtpfsBaseName(oldPath)); in ReNameInner()
368 const std::string tmpOldDirName(SmtpfsDirName(oldPath)); in ReNameInner()
399 LOGE("Could not move %{public}s to %{public}s", oldPath in ReNameInner()
421 ReName(const std::string &oldPath, const std::string &newPath) ReName() argument
615 FileRename(const std::string &oldPath, const std::string &newPath) FileRename() argument
[all...]
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/properties/
H A Dsymlink.cpp55 auto [resGetSymlinkArg, oldPath, newPath] = GetSymlinkArg(env, funcArg); in Sync()
60 if (symlink(oldPath.c_str(), newPath.c_str()) == -1) { in Sync()
76 auto [resGetSymlinkArg, oldPath, newPath] = GetSymlinkArg(env, funcArg); in Async()
81 auto cbExec = [oldPath = move(oldPath), newPath = move(newPath)](napi_env env) -> UniError { in Async()
82 int ret = symlink(oldPath.c_str(), newPath.c_str()); in Async()
H A Dlink.cpp56 auto [resGetLinkArg, oldPath, newPath] = GetLinkArg(env, funcArg); in Sync()
61 if (link(oldPath.c_str(), newPath.c_str()) == -1) { in Sync()
77 auto [resGetLinkArg, oldPath, newPath] = GetLinkArg(env, funcArg); in Async()
82 auto cbExec = [oldPath = move(oldPath), newPath = move(newPath)](napi_env env) -> UniError { in Async()
83 int ret = link(oldPath.c_str(), newPath.c_str()); in Async()
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/
H A Dsymlink.cpp56 auto [resGetSymlinkArg, oldPath, newPath] = GetSymlinkArg(env, funcArg); in Sync()
70 int ret = uv_fs_symlink(nullptr, symlink_req.get(), oldPath.c_str(), newPath.c_str(), 0, nullptr); in Sync()
89 auto [resGetSymlinkArg, oldPath, newPath] = GetSymlinkArg(env, funcArg); in Async()
96 auto cbExec = [oldPath = move(oldPath), newPath = move(newPath)]() -> NError { in Async()
103 int ret = uv_fs_symlink(nullptr, symlink_req.get(), oldPath.c_str(), newPath.c_str(), 0, nullptr); in Async()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_helper_test/src/
H A Dmedia_file_utils_test.cpp108 string oldPath = "/data/test/movefile_001"; in HWTEST_F() local
110 EXPECT_EQ(MediaFileUtils::CreateFile(oldPath), true); in HWTEST_F()
111 EXPECT_EQ(MediaFileUtils::MoveFile(oldPath, newPath), true); in HWTEST_F()
116 string oldPath = "/data/test/movefile_002"; in HWTEST_F() local
118 EXPECT_EQ(MediaFileUtils::CreateFile(oldPath), true); in HWTEST_F()
120 EXPECT_EQ(MediaFileUtils::MoveFile(oldPath, newPath), false); in HWTEST_F()
125 string oldPath = "/data/test/movefile_003"; in HWTEST_F() local
127 EXPECT_EQ(MediaFileUtils::MoveFile(oldPath, newPath), false); in HWTEST_F()
167 string oldPath = "/data/test/CopyByFd_001"; in HWTEST_F() local
171 EXPECT_EQ(MediaFileUtils::CreateFile(oldPath), tru in HWTEST_F()
185 string oldPath = "/data/test/renamedir_001"; HWTEST_F() local
193 string oldPath = "/data/test/renamedir_002"; HWTEST_F() local
547 string oldPath; HWTEST_F() local
570 string oldPath = "datashare://test/Photo"; HWTEST_F() local
[all...]
/foundation/filemanagement/storage_service/services/storage_daemon/mtpfs/include/
H A Dmtpfs_mtp_device.h78 int DirReName(const std::string &oldPath, const std::string &newPath);
81 int ReName(const std::string &oldPath, const std::string &newPath);
88 int FileRename(const std::string &oldPath, const std::string &newPath);
107 int ReNameInner(const std::string &oldPath, const std::string &newPath);
/foundation/multimedia/ringtone_library/test/unittest/ringtone_utils_test/src/
H A Dringtone_file_utils_test.cpp216 string oldPath = "/data/local/tmp/test/movefile_001.ogg"; in HWTEST_F() local
218 EXPECT_EQ(RingtoneFileUtils::CreateFile(oldPath), E_SUCCESS); in HWTEST_F()
219 EXPECT_EQ(RingtoneFileUtils::MoveFile(oldPath, newPath), true); in HWTEST_F()
224 string oldPath = "/data/local/tmp/test/movefile_001.ogg"; in HWTEST_F() local
226 EXPECT_EQ(RingtoneFileUtils::CreateFile(oldPath), E_SUCCESS); in HWTEST_F()
227 EXPECT_EQ(RingtoneFileUtils::CopyFileUtil(oldPath, newPath), true); in HWTEST_F()
/foundation/filemanagement/app_file_service/utils/src/b_filesystem/
H A Db_file.cpp106 string oldPath(resolvedPath.get()); in CopyFile()
107 UniqueFd fdFrom(open(oldPath.data(), O_RDONLY)); in CopyFile()
172 std::string oldPath = ""; in MoveFile() local
173 if (!GetRealPath(from, oldPath)) { in MoveFile()
189 if (rename(oldPath.c_str(), newPath.c_str()) != 0) { in MoveFile()
191 UniqueFd fdFrom(open(oldPath.data(), O_RDONLY)); in MoveFile()
/foundation/bundlemanager/bundle_framework/services/bundlemgr/test/mock/src/
H A Dinstalld_client.cpp89 ErrCode InstalldClient::RenameModuleDir(const std::string &oldPath, const std::string &newPath) in RenameModuleDir() argument
91 if (oldPath.empty() || newPath.empty()) { in RenameModuleDir()
96 return CallService(&IInstalld::RenameModuleDir, oldPath, newPath); in RenameModuleDir()
251 ErrCode InstalldClient::MoveFile(const std::string &oldPath, const std::string &newPath) in MoveFile() argument
253 if (oldPath.empty() || newPath.empty()) { in MoveFile()
258 return CallService(&IInstalld::MoveFile, oldPath, newPath); in MoveFile()
261 ErrCode InstalldClient::CopyFile(const std::string &oldPath, const std::string &newPath, in CopyFile() argument
264 if (oldPath.empty() || newPath.empty()) { in CopyFile()
269 return CallService(&IInstalld::CopyFile, oldPath, newPath, signatureFilePath); in CopyFile()
H A Dmock_installd_host_impl.cpp59 ErrCode InstalldHostImpl::RenameModuleDir(const std::string &oldPath, const std::string &newPath) in RenameModuleDir() argument
140 ErrCode InstalldHostImpl::MoveFile(const std::string &oldPath, const std::string &newPath) in MoveFile() argument
145 ErrCode InstalldHostImpl::CopyFile(const std::string &oldPath, const std::string &newPath, in CopyFile() argument
H A Dmock_install_client.cpp67 ErrCode InstalldClient::RenameModuleDir(const std::string &oldPath, const std::string &newPath) in RenameModuleDir() argument
160 ErrCode InstalldClient::MoveFile(const std::string &oldPath, const std::string &newPath) in MoveFile() argument
165 ErrCode InstalldClient::CopyFile(const std::string &oldPath, const std::string &newPath, in CopyFile() argument
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/src/network/softbus/
H A Dsoftbus_asset_recv_listener.cpp183 std::string oldPath = fileList[0]; in MoveAsset() local
184 std::string newPath = oldPath; in MoveAsset()
187 LOGE("get asset temp dir fail, file name is %{public}s", GetAnonyString(oldPath).c_str()); in MoveAsset()
193 LOGE("get asset flag fail, file name is %{public}s", GetAnonyString(oldPath).c_str()); in MoveAsset()
199 std::filesystem::rename(oldPath.c_str(), newPath.c_str()); in MoveAsset()
207 for (auto oldPath : fileList) { in MoveAsset()
208 std::string newPath = oldPath; in MoveAsset()
211 LOGE("get asset temp dir fail, file name is %{public}s", GetAnonyString(oldPath).c_str()); in MoveAsset()
217 std::filesystem::rename(oldPath.c_str(), newPath.c_str()); in MoveAsset()
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/
H A Dinstalld_client.cpp95 ErrCode InstalldClient::RenameModuleDir(const std::string &oldPath, const std::string &newPath) in RenameModuleDir() argument
97 if (oldPath.empty() || newPath.empty()) { in RenameModuleDir()
102 return CallService(&IInstalld::RenameModuleDir, oldPath, newPath); in RenameModuleDir()
309 ErrCode InstalldClient::MoveFile(const std::string &oldPath, const std::string &newPath) in MoveFile() argument
311 if (oldPath.empty() || newPath.empty()) { in MoveFile()
316 return CallService(&IInstalld::MoveFile, oldPath, newPath); in MoveFile()
319 ErrCode InstalldClient::CopyFile(const std::string &oldPath, const std::string &newPath, in CopyFile() argument
322 if (oldPath.empty() || newPath.empty()) { in CopyFile()
327 return CallService(&IInstalld::CopyFile, oldPath, newPath, signatureFilePath); in CopyFile()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/
H A Dmedialibrary_smartalbum_map_operations.cpp517 const string &oldPath, const uint32_t trashType) in UpdateTrashInfoInDb()
521 values.PutString(MEDIA_DATA_DB_RECYCLE_PATH, oldPath); in UpdateTrashInfoInDb()
530 string oldPath = MediaLibraryObjectUtils::GetPathByIdFromDb(to_string(assetId)); in TrashDirAssetsInfoUtil() local
531 string trashDirPath = GetAssetRecycle(assetId, oldPath, trashDirPath); in TrashDirAssetsInfoUtil()
542 if (!MediaFileUtils::RenameDir(oldPath, recyclePath)) { in TrashDirAssetsInfoUtil()
548 return UpdateTrashInfoInDb(assetId, trashDate, recyclePath, oldPath, TRASHED_DIR); in TrashDirAssetsInfoUtil()
553 string oldPath = MediaLibraryObjectUtils::GetPathByIdFromDb(to_string(assetId)); in TrashFileAssetsInfoUtil() local
554 string trashDirPath = GetAssetRecycle(assetId, oldPath, trashDirPath); in TrashFileAssetsInfoUtil()
565 errorCode = MediaFileUtils::ModifyAsset(oldPath, recyclePath); in TrashFileAssetsInfoUtil()
569 return UpdateTrashInfoInDb(assetId, trashDate, recyclePath, oldPath, TRASHED_ASSE in TrashFileAssetsInfoUtil()
516 UpdateTrashInfoInDb(const int32_t assetId, const int64_t trashDate, string &recyclePath, const string &oldPath, const uint32_t trashType) UpdateTrashInfoInDb() argument
[all...]
/foundation/bundlemanager/bundle_framework/services/bundlemgr/test/unittest/bms_installd_client_test/
H A Dbms_installd_client_test.cpp37 const std::string OLD_PATH = "oldPath";
305 * @tc.desc: Test whether RenameModuleDir is called normally.(oldPath is empty)
310 std::string oldPath = EMPTY_STRING; in HWTEST_F() local
312 ErrCode result = installClient_->RenameModuleDir(oldPath, newPath); in HWTEST_F()
325 std::string oldPath = OLD_PATH; in HWTEST_F() local
327 ErrCode result = installClient_->RenameModuleDir(oldPath, newPath); in HWTEST_F()
340 std::string oldPath = OLD_PATH; in HWTEST_F() local
342 ErrCode result = installClient_->RenameModuleDir(oldPath, newPath); in HWTEST_F()
343 EXPECT_EQ(result, installClient_->CallService(&IInstalld::RenameModuleDir, oldPath, newPath)); in HWTEST_F()
766 * @tc.desc: Test whether MoveFile is called normally.(oldPath i
771 std::string oldPath = EMPTY_STRING; HWTEST_F() local
786 std::string oldPath = OLD_PATH; HWTEST_F() local
801 std::string oldPath = OLD_PATH; HWTEST_F() local
816 std::string oldPath = EMPTY_STRING; HWTEST_F() local
831 std::string oldPath = OLD_PATH; HWTEST_F() local
846 std::string oldPath = OLD_PATH; HWTEST_F() local
[all...]
/foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/
H A Dmedia_file_utils.cpp557 bool MediaFileUtils::MoveFile(const string &oldPath, const string &newPath) in MoveFile() argument
561 if (IsFileExists(oldPath) && !IsFileExists(newPath)) { in MoveFile()
562 errRet = (rename(oldPath.c_str(), newPath.c_str()) == E_SUCCESS); in MoveFile()
774 bool MediaFileUtils::RenameDir(const string &oldPath, const string &newPath) in RenameDir() argument
778 if (IsDirectory(oldPath)) { in RenameDir()
779 errRet = (rename(oldPath.c_str(), newPath.c_str()) == E_SUCCESS); in RenameDir()
1254 int32_t MediaFileUtils::ModifyAsset(const string &oldPath, const string &newPath) argument
1258 if (oldPath.empty() || newPath.empty()) {
1259 MEDIA_ERR_LOG("Failed to modify asset, oldPath: %{private}s or newPath: %{private}s is empty!",
1260 oldPath
[all...]
/foundation/multimedia/media_library/frameworks/services/media_backup_extension/src/
H A Dupgrade_restore.cpp288 info.oldPath = GetStringVal(AUDIO_DATA, resultSet); in ParseResultSetFromAudioDb()
289 if (!ConvertPathToRealPath(info.oldPath, filePath_, info.filePath, info.relativePath)) { in ParseResultSetFromAudioDb()
291 BackupFileUtils::GarbleFilePath(info.oldPath, DEFAULT_RESTORE_ID).c_str()); in ParseResultSetFromAudioDb()
586 info.oldPath = GetStringVal(EXTERNAL_FILE_DATA, resultSet); in ParseResultSetForAudio()
590 BackupFileUtils::GarbleFilePath(info.oldPath, DEFAULT_RESTORE_ID).c_str()); in ParseResultSetForAudio()
594 if (!BaseRestore::ConvertPathToRealPath(info.oldPath, filePath_, info.filePath, info.relativePath)) { in ParseResultSetForAudio()
596 BackupFileUtils::GarbleFilePath(info.oldPath, DEFAULT_RESTORE_ID).c_str()); in ParseResultSetForAudio()
604 BackupFileUtils::GarbleFilePath(info.oldPath, DEFAULT_RESTORE_ID).c_str()); in ParseResultSetForAudio()
657 info.oldPath = GetStringVal(GALLERY_FILE_DATA, resultSet); in ParseResultSet()
658 if (this->photosRestorePtr_->IsDuplicateData(info.oldPath)) { in ParseResultSet()
[all...]
H A Dbackup_file_utils.cpp320 int32_t BackupFileUtils::MoveFile(const string &oldPath, const string &newPath, int32_t sceneCode) in MoveFile() argument
323 if (!MediaFileUtils::IsFileExists(oldPath)) { in MoveFile()
324 MEDIA_ERR_LOG("old path: %{public}s is not exists.", GarbleFilePath(oldPath, sceneCode).c_str()); in MoveFile()
330 return rename(oldPath.c_str(), newPath.c_str()); in MoveFile()
577 static void addPathSuffix(const string &oldPath, const string &suffix, string &newPath) in addPathSuffix() argument
579 if (oldPath.empty() || suffix.empty()) { in addPathSuffix()
580 MEDIA_WARN_LOG("oldPath or suffix is empty"); in addPathSuffix()
584 newPath = oldPath + suffix; in addPathSuffix()
/foundation/bundlemanager/bundle_framework/services/bundlemgr/include/installd/
H A Dinstalld_host_impl.h74 * @param oldPath Indicates the old path name.
78 virtual ErrCode RenameModuleDir(const std::string &oldPath, const std::string &newPath) override;
166 virtual ErrCode MoveFile(const std::string &oldPath, const std::string &newPath) override;
168 virtual ErrCode CopyFile(const std::string &oldPath, const std::string &newPath,
/foundation/bundlemanager/bundle_framework/services/bundlemgr/include/
H A Dinstalld_client.h55 * @param oldPath Indicates the old path name.
59 ErrCode RenameModuleDir(const std::string &oldPath, const std::string &newPath);
152 ErrCode MoveFile(const std::string &oldPath, const std::string &newPath);
154 ErrCode CopyFile(const std::string &oldPath, const std::string &newPath,
H A Dbundle_util.h164 * @brief Rename file from oldPath to newPath.
165 * @param oldPath Indicates oldPath.
169 static bool RenameFile(const std::string &oldPath, const std::string &newPath);
171 * @brief Copy file from oldPath to newPath.
172 * @param oldPath Indicates oldPath.
177 const std::string &oldPath, const std::string &newPath);
/foundation/bundlemanager/bundle_framework/services/bundlemgr/include/ipc/
H A Dinstalld_proxy.h76 * @param oldPath Indicates the old path name.
80 virtual ErrCode RenameModuleDir(const std::string &oldPath, const std::string &newPath) override;
167 virtual ErrCode MoveFile(const std::string &oldPath, const std::string &newPath) override;
169 virtual ErrCode CopyFile(const std::string &oldPath, const std::string &newPath,
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/backup/src/
H A Dbackup_manager.cpp278 void BackupManager::CopyFile(const std::string &oldPath, const std::string &newPath, bool isCreate) in CopyFile() argument
281 if (!IsFileExist(oldPath)) { in CopyFile()
284 fin.open(oldPath, std::ios_base::in); in CopyFile()
/foundation/multimedia/media_library/frameworks/services/media_backup_extension/src/restore/
H A Dtab_old_photos_restore.cpp36 std::vector<NativeRdb::ValueObject> bindArgs = { fileInfo.fileIdOld, fileInfo.oldPath, fileInfo.cloudPath}; in Restore()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/backup/include/
H A Dbackup_manager.h51 void CopyFile(const std::string &oldPath, const std::string &newPath, bool isCreate = false);

Completed in 24 milliseconds

12