Lines Matching refs:from_path

180 bool DoCopyDirectory(const FilePath& from_path,  in DoCopyDirectory()  argument
189 DCHECK(from_path.value().find('*') == std::string::npos); in DoCopyDirectory()
191 if (from_path.value().size() >= PATH_MAX) { in DoCopyDirectory()
204 FilePath real_from_path = MakeAbsoluteFilePath(from_path); in DoCopyDirectory()
213 FileEnumerator traversal(from_path, recursive, traverse_type); in DoCopyDirectory()
218 FilePath current = from_path; in DoCopyDirectory()
219 if (stat(from_path.value().c_str(), &from_stat) < 0) { in DoCopyDirectory()
221 << from_path.value(); in DoCopyDirectory()
224 FilePath from_path_base = from_path; in DoCopyDirectory()
228 from_path_base = from_path.DirName(); in DoCopyDirectory()
384 bool ReplaceFile(const FilePath& from_path, in ReplaceFile() argument
388 if (rename(from_path.value().c_str(), to_path.value().c_str()) == 0) in ReplaceFile()
395 bool CopyDirectory(const FilePath& from_path, in CopyDirectory() argument
398 return DoCopyDirectory(from_path, to_path, recursive, false); in CopyDirectory()
401 bool CopyDirectoryExcl(const FilePath& from_path, in CopyDirectoryExcl() argument
404 return DoCopyDirectory(from_path, to_path, recursive, true); in CopyDirectoryExcl()
1008 bool CopyFile(const FilePath& from_path, const FilePath& to_path) { in CopyFile() argument
1012 if (from_path.IsContentUri()) { in CopyFile()
1013 infile = OpenContentUriForRead(from_path); in CopyFile()
1015 infile = File(from_path, File::FLAG_OPEN | File::FLAG_READ); in CopyFile()
1018 infile = File(from_path, File::FLAG_OPEN | File::FLAG_READ); in CopyFile()
1035 bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) { in MoveUnsafe() argument
1042 if (CallStat(from_path.value().c_str(), &from_file_info) != 0) in MoveUnsafe()
1048 if (rename(from_path.value().c_str(), to_path.value().c_str()) == 0) in MoveUnsafe()
1051 if (!CopyDirectory(from_path, to_path, true)) in MoveUnsafe()
1054 DeleteFile(from_path, true); in MoveUnsafe()