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_) { }
64 explicit FilePath(const char* pathname) : pathname_(pathname) {
68 explicit FilePath(const String& pathname) : pathname_(pathname) {
72 FilePath& operator=(const FilePath& rhs) {
77 void Set(const FilePath& rhs) {
85 static FilePath GetCurrentDir();
91 static FilePath MakeFileName(const FilePath& directory,
92 const FilePath& base_name,
99 static FilePath ConcatPaths(const FilePath& directory,
100 const FilePath& relative_path);
110 static FilePath GenerateUniqueFileName(const FilePath& directory,
111 const FilePath& base_name,
120 FilePath RemoveTrailingPathSeparator() const;
122 // Returns a copy of the FilePath with the directory part removed.
123 // Example: FilePath("path/to/file").RemoveDirectoryName() returns
124 // FilePath("file"). If there is no directory part ("just_a_file"), it returns
125 // the FilePath unmodified. If there is no file part ("just_a_dir/") it
126 // returns an empty FilePath ("").
128 FilePath RemoveDirectoryName() const;
131 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
132 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
133 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
134 // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
136 FilePath RemoveFileName() const;
138 // Returns a copy of the FilePath with the case-insensitive extension removed.
139 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
140 // FilePath("dir/file"). If a case-insensitive extension is not
141 // found, returns a copy of the original FilePath.
142 FilePath RemoveExtension(const char* extension) const;
146 // directories for any reason. Will also return false if the FilePath does
156 // Returns true if FilePath describes something in the file-system,
164 // Returns true if FilePath ends with a path separator, which indicates that
188 // but some of the functions in FilePath will not handle that correctly. In
196 }; // class FilePath