Home | History | Annotate | Download | only in base

Lines Matching refs:from_path

238 bool ReplaceFile(const FilePath& from_path,
242 if (rename(from_path.value().c_str(), to_path.value().c_str()) == 0)
249 bool CopyDirectory(const FilePath& from_path,
257 DCHECK(from_path.value().find('*') == std::string::npos);
259 if (from_path.value().size() >= PATH_MAX) {
274 FilePath real_from_path = MakeAbsoluteFilePath(from_path);
286 FileEnumerator traversal(from_path, recursive, traverse_type);
291 FilePath current = from_path;
292 if (stat(from_path.value().c_str(), &from_stat) < 0) {
294 << from_path.value() << " errno = " << errno;
298 FilePath from_path_base = from_path;
303 from_path_base = from_path.DirName();
307 // will always have a directory for from_path.
313 // current is the source path, including from_path, so append
314 // the suffix after from_path to to_path to create the target_path.
836 bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) {
838 // Windows compatibility: if to_path exists, from_path and to_path
843 if (CallStat(from_path.value().c_str(), &from_file_info) == 0) {
851 if (rename(from_path.value().c_str(), to_path.value().c_str()) == 0)
854 if (!CopyDirectory(from_path, to_path, true))
857 DeleteFile(from_path, true);
863 bool CopyFileUnsafe(const FilePath& from_path, const FilePath& to_path) {
865 int infile = HANDLE_EINTR(open(from_path.value().c_str(), O_RDONLY));