Lines Matching refs:old_path
222 bool UnixFilesystem::MoveFile(const Pathname &old_path, in MoveFile() argument
224 if (!IsFile(old_path)) { in MoveFile()
225 ASSERT(IsFile(old_path)); in MoveFile()
228 LOG(LS_VERBOSE) << "Moving " << old_path.pathname() in MoveFile()
230 if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) { in MoveFile()
233 if (!CopyFile(old_path, new_path)) in MoveFile()
235 if (!DeleteFile(old_path)) in MoveFile()
241 bool UnixFilesystem::MoveFolder(const Pathname &old_path, in MoveFolder() argument
243 if (!IsFolder(old_path)) { in MoveFolder()
244 ASSERT(IsFolder(old_path)); in MoveFolder()
247 LOG(LS_VERBOSE) << "Moving " << old_path.pathname() in MoveFolder()
249 if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) { in MoveFolder()
252 if (!CopyFolder(old_path, new_path)) in MoveFolder()
254 if (!DeleteFolderAndContents(old_path)) in MoveFolder()
267 bool UnixFilesystem::CopyFile(const Pathname &old_path, in CopyFile() argument
269 LOG(LS_VERBOSE) << "Copying " << old_path.pathname() in CopyFile()
274 StreamInterface *source = OpenFile(old_path, "rb"); in CopyFile()