Home | History | Annotate | Download | only in base

Lines Matching full:filepath

85 bool RealPath(const FilePath& path, FilePath* real_path) {
87 FilePath::CharType buf[PATH_MAX];
91 *real_path = FilePath(buf);
96 bool VerifySpecificPathControlledByUser(const FilePath& path,
149 int CreateAndOpenFdForTemporaryFile(FilePath directory, FilePath* path) {
167 FilePath path;
169 ScopedFD fd(CreateAndOpenFdForTemporaryFile(FilePath("/dev/shm"), &path));
189 FilePath MakeAbsoluteFilePath(const FilePath& input) {
193 return FilePath();
194 return FilePath(full_path);
201 bool DeleteFile(const FilePath& path, bool recursive) {
222 for (FilePath current = traversal.Next(); success && !current.empty();
231 FilePath dir = FilePath(directories.top());
238 bool ReplaceFile(const FilePath& from_path,
239 const FilePath& to_path,
249 bool CopyDirectory(const FilePath& from_path,
250 const FilePath& to_path,
264 FilePath real_to_path = to_path;
274 FilePath real_from_path = MakeAbsoluteFilePath(from_path);
291 FilePath current = from_path;
298 FilePath from_path_base = from_path;
315 FilePath target_path(to_path);
349 bool PathExists(const FilePath& path) {
359 bool PathIsWritable(const FilePath& path) {
364 bool DirectoryExists(const FilePath& path) {
384 bool CreateSymbolicLink(const FilePath& target_path,
385 const FilePath& symlink_path) {
392 bool ReadSymbolicLink(const FilePath& symlink_path, FilePath* target_path) {
403 *target_path = FilePath(FilePath::StringType(buf, count));
407 bool GetPosixFilePermissions(const FilePath& path, int* mode) {
421 bool SetPosixFilePermissions(const FilePath& path,
443 bool GetTempDir(FilePath* path) {
446 *path = FilePath(tmp);
451 *path = FilePath("/tmp");
459 FilePath GetHomeDir() {
464 return FilePath("/");
470 return FilePath(home_dir);
483 return FilePath(home_dir);
486 FilePath rv;
491 return FilePath("/tmp");
495 bool CreateTemporaryFile(FilePath* path) {
497 FilePath directory;
507 FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path) {
518 bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file) {
524 static bool CreateTemporaryDirInDirImpl(const FilePath
525 const FilePath::StringType& name_tmpl,
526 FilePath* new_dir) {
528 DCHECK(name_tmpl.find("XXXXXX") != FilePath::StringType::npos)
531 FilePath sub_dir = base_dir.Append(name_tmpl);
541 *new_dir = FilePath(dtemp);
545 bool CreateTemporaryDirInDir(const FilePath& base_dir,
546 const FilePath::StringType& prefix,
547 FilePath* new_dir) {
548 FilePath::StringType mkdtemp_template = prefix;
553 bool CreateNewTempDirectory(const FilePath::StringType& prefix,
554 FilePath* new_temp_path) {
555 FilePath tmpdir;
562 bool CreateDirectoryAndGetError(const FilePath& full_path,
565 std::vector<FilePath> subpaths;
568 FilePath last_path = full_path;
570 for (FilePath path = full_path.DirName();
577 for (std::vector<FilePath>::reverse_iterator i = subpaths.rbegin();
597 bool NormalizeFilePath(const FilePath& path, FilePath* normalized_path) {
598 FilePath real_path_result;
615 bool IsLink(const FilePath& file_path) {
628 bool GetFileInfo(const FilePath& file_path, File::Info* results) {
648 FILE* OpenFile(const FilePath& filename, const char* mode) {
667 int ReadFile(const FilePath& filename, char* data, int max_size) {
679 int WriteFile(const FilePath& filename, const char* data, int size) {
706 int AppendToFile(const FilePath& filename, const char* data, int size) {
719 bool GetCurrentDirectory(FilePath* dir) {
728 *dir = FilePath(system_buffer);
733 bool SetCurrentDirectory(const FilePath& path) {
739 bool VerifyPathControlledByUser(const FilePath& base,
740 const FilePath& path,
749 std::vector<FilePath::StringType> base_components;
750 std::vector<FilePath::StringType> path_components;
755 std::vector<FilePath::StringType>::const_iterator ib, ip;
765 FilePath current_path = base;
779 bool VerifyPathControlledByAdmin(const FilePath& path) {
781 const FilePath kFileSystemRoot("/");
809 int GetMaximumPathComponentLength(const FilePath& path) {
816 bool GetShmemTempDir(bool executable, FilePath* path) {
824 *path = FilePath("/dev/shm");
836 bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) {
863 bool CopyFileUnsafe(const FilePath& from_path, const FilePath& to_path) {