Lines Matching refs:FilePath
81 bool VerifySpecificPathControlledByUser(const FilePath& path,
162 FilePath MakeAbsoluteFilePath(const FilePath& input) {
165 return FilePath();
166 return FilePath(full_path);
173 bool DeleteFile(const FilePath& path, bool recursive) {
191 for (FilePath current = traversal.Next(); !current.empty();
200 FilePath dir = FilePath(directories.top());
207 bool ReplaceFile(const FilePath& from_path,
208 const FilePath& to_path,
262 bool PathExists(const FilePath& path) {
266 bool PathIsWritable(const FilePath& path) {
270 bool DirectoryExists(const FilePath& path) {
277 ScopedFD CreateAndOpenFdForTemporaryFileInDir(const FilePath& directory,
278 FilePath* path) {
288 bool CreateSymbolicLink(const FilePath& target_path,
289 const FilePath& symlink_path) {
296 bool ReadSymbolicLink(const FilePath& symlink_path, FilePath* target_path) {
307 *target_path = FilePath(FilePath::StringType(buf, count));
311 bool GetPosixFilePermissions(const FilePath& path, int* mode) {
324 bool SetPosixFilePermissions(const FilePath& path, int mode) {
343 const FilePath::StringType& executable) {
352 FilePath file(cur_path);
363 bool GetTempDir(FilePath* path) {
366 *path = FilePath(tmp);
370 *path = FilePath("/tmp");
375 FilePath GetHomeDir() {
378 return FilePath(home_dir);
380 FilePath rv;
385 return FilePath("/tmp");
389 File CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* temp_file) {
394 static bool CreateTemporaryDirInDirImpl(const FilePath& base_dir,
395 const FilePath::StringType& name_tmpl,
396 FilePath* new_dir) {
397 DCHECK(name_tmpl.find("XXXXXX") != FilePath::StringType::npos)
400 FilePath sub_dir = base_dir.Append(name_tmpl);
424 *new_dir = FilePath(dtemp);
428 bool CreateTemporaryDirInDir(const FilePath& base_dir,
429 const FilePath::StringType& prefix,
430 FilePath* new_dir) {
431 FilePath::StringType mkdtemp_template = prefix;
436 bool CreateNewTempDirectory(const FilePath::StringType& prefix,
437 FilePath* new_temp_path) {
438 FilePath tmpdir;
445 bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) {
446 std::vector<FilePath> subpaths;
449 FilePath last_path = full_path;
451 for (FilePath path = full_path.DirName(); path.value() != last_path.value();
458 for (std::vector<FilePath>::reverse_iterator i = subpaths.rbegin();
478 bool NormalizeFilePath(const FilePath& path, FilePath* normalized_path) {
479 FilePath real_path_result = MakeAbsoluteFilePath(path);
494 bool IsLink(const FilePath& file_path) {
503 bool GetFileInfo(const FilePath& file_path, File::Info* results) {
512 FILE* OpenFile(const FilePath& filename, const char* mode) {
545 int ReadFile(const FilePath& filename, char* data, int max_size) {
556 int WriteFile(const FilePath& filename, const char* data, int size) {
581 bool AppendToFile(const FilePath& filename, const char* data, int size) {
600 bool GetCurrentDirectory(FilePath* dir) {
606 *dir = FilePath(system_buffer);
610 bool SetCurrentDirectory(const FilePath& path) {
614 bool VerifyPathControlledByUser(const FilePath& base,
615 const FilePath& path,
624 std::vector<FilePath::StringType> base_components;
625 std::vector<FilePath::StringType> path_components;
630 std::vector<FilePath::StringType>::const_iterator ib, ip;
640 FilePath current_path = base;
654 bool VerifyPathControlledByAdmin(const FilePath& path) {
656 const FilePath kFileSystemRoot("/");
678 int GetMaximumPathComponentLength(const FilePath& path) {
684 bool CopyFile(const FilePath& from_path, const FilePath& to_path) {