Lines Matching refs:FilePath
94 FilePath FilePath::GetCurrentDir() { in GetCurrentDir()
99 return FilePath(kCurrentDirectoryString); in GetCurrentDir()
102 return FilePath(_getcwd(cwd, sizeof(cwd)) == nullptr ? "" : cwd); in GetCurrentDir()
110 return FilePath(result == nullptr ? kCurrentDirectoryString : cwd); in GetCurrentDir()
112 return FilePath(result == nullptr ? "" : cwd); in GetCurrentDir()
120 FilePath FilePath::RemoveExtension(const char* extension) const { in RemoveExtension()
123 return FilePath(pathname_.substr( in RemoveExtension()
132 const char* FilePath::FindLastPathSeparator() const { in FindLastPathSeparator()
151 FilePath FilePath::RemoveDirectoryName() const { in RemoveDirectoryName()
153 return last_sep ? FilePath(last_sep + 1) : *this; in RemoveDirectoryName()
162 FilePath FilePath::RemoveFileName() const { in RemoveFileName()
170 return FilePath(dir); in RemoveFileName()
179 FilePath FilePath::MakeFileName(const FilePath& directory, in MakeFileName()
180 const FilePath& base_name, in MakeFileName()
190 return ConcatPaths(directory, FilePath(file)); in MakeFileName()
195 FilePath FilePath::ConcatPaths(const FilePath& directory, in ConcatPaths()
196 const FilePath& relative_path) { in ConcatPaths()
199 const FilePath dir(directory.RemoveTrailingPathSeparator()); in ConcatPaths()
200 return FilePath(dir.string() + kPathSeparator + relative_path.string()); in ConcatPaths()
205 bool FilePath::FileOrDirectoryExists() const { in FileOrDirectoryExists()
219 bool FilePath::DirectoryExists() const { in DirectoryExists()
224 const FilePath& path(IsRootDirectory() ? *this : in DirectoryExists()
227 const FilePath& path(*this); in DirectoryExists()
249 bool FilePath::IsRootDirectory() const { in IsRootDirectory()
258 bool FilePath::IsAbsolutePath() const { in IsAbsolutePath()
279 FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, in GenerateUniqueFileName()
280 const FilePath& base_name, in GenerateUniqueFileName()
282 FilePath full_pathname; in GenerateUniqueFileName()
293 bool FilePath::IsDirectory() const { in IsDirectory()
301 bool FilePath::CreateDirectoriesRecursively() const { in CreateDirectoriesRecursively()
310 const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); in CreateDirectoriesRecursively()
318 bool FilePath::CreateFolder() const { in CreateFolder()
320 FilePath removed_sep(this->RemoveTrailingPathSeparator()); in CreateFolder()
339 FilePath FilePath::RemoveTrailingPathSeparator() const { in RemoveTrailingPathSeparator()
341 ? FilePath(pathname_.substr(0, pathname_.length() - 1)) in RemoveTrailingPathSeparator()
348 void FilePath::Normalize() { in Normalize()