Lines Matching defs:FilePath

48 // FilePath - a class for file and directory pathname manipulation which
53 // A FilePath with a value ending in a path separator ("like/this/") represents
59 class FilePath {
61 FilePath() : pathname_("") { }
62 FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
63 explicit FilePath(const char* pathname) : pathname_(pathname) { }
64 explicit FilePath(const String& pathname) : pathname_(pathname) { }
66 void Set(const FilePath& rhs) {
77 static FilePath MakeFileName(const FilePath& directory,
78 const FilePath& base_name,
90 static FilePath GenerateUniqueFileName(const FilePath& directory,
91 const FilePath& base_name,
97 FilePath RemoveTrailingPathSeparator() const;
99 // Returns a copy of the FilePath with the directory part removed.
100 // Example: FilePath("path/to/file").RemoveDirectoryName() returns
101 // FilePath("file"). If there is no directory part ("just_a_file"), it returns
102 // the FilePath unmodified. If there is no file part ("just_a_dir/") it
103 // returns an empty FilePath ("").
105 FilePath RemoveDirectoryName() const;
108 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
109 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
110 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
111 // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
113 FilePath RemoveFileName() const;
115 // Returns a copy of the FilePath with the case-insensitive extension removed.
116 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
117 // FilePath("dir/file"). If a case-insensitive extension is not
118 // found, returns a copy of the original FilePath.
119 FilePath RemoveExtension(const char* extension) const;
123 // directories for any reason. Will also return false if the FilePath does
133 // Returns true if FilePath describes something in the file-system,
141 // Returns true if FilePath ends with a path separator, which indicates that
150 FilePath& operator=(const FilePath& rhs);
151 }; // class FilePath