• Home
  • Raw
  • Download

Lines Matching refs:FilePath

101 FilePath FilePath::GetCurrentDir() {  in GetCurrentDir()
108 return FilePath(kCurrentDirectoryString); in GetCurrentDir()
111 return FilePath(_getcwd(cwd, sizeof(cwd)) == nullptr ? "" : cwd); in GetCurrentDir()
119 return FilePath(result == nullptr ? kCurrentDirectoryString : cwd); in GetCurrentDir()
121 return FilePath(result == nullptr ? "" : cwd); in GetCurrentDir()
129 FilePath FilePath::RemoveExtension(const char* extension) const { in RemoveExtension()
132 return FilePath( in RemoveExtension()
141 const char* FilePath::FindLastPathSeparator() const { in FindLastPathSeparator()
154 size_t FilePath::CalculateRootLength() const { in CalculateRootLength()
198 FilePath FilePath::RemoveDirectoryName() const { in RemoveDirectoryName()
200 return last_sep ? FilePath(last_sep + 1) : *this; in RemoveDirectoryName()
209 FilePath FilePath::RemoveFileName() const { in RemoveFileName()
217 return FilePath(dir); in RemoveFileName()
226 FilePath FilePath::MakeFileName(const FilePath& directory, in MakeFileName()
227 const FilePath& base_name, int number, in MakeFileName()
236 return ConcatPaths(directory, FilePath(file)); in MakeFileName()
241 FilePath FilePath::ConcatPaths(const FilePath& directory, in ConcatPaths()
242 const FilePath& relative_path) { in ConcatPaths()
244 const FilePath dir(directory.RemoveTrailingPathSeparator()); in ConcatPaths()
245 return FilePath(dir.string() + kPathSeparator + relative_path.string()); in ConcatPaths()
250 bool FilePath::FileOrDirectoryExists() const { in FileOrDirectoryExists()
264 bool FilePath::DirectoryExists() const { in DirectoryExists()
269 const FilePath& path(IsRootDirectory() ? *this in DirectoryExists()
272 const FilePath& path(*this); in DirectoryExists()
294 bool FilePath::IsRootDirectory() const { in IsRootDirectory()
301 bool FilePath::IsAbsolutePath() const { return CalculateRootLength() > 0; } in IsAbsolutePath()
311 FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, in GenerateUniqueFileName()
312 const FilePath& base_name, in GenerateUniqueFileName()
314 FilePath full_pathname; in GenerateUniqueFileName()
325 bool FilePath::IsDirectory() const { in IsDirectory()
333 bool FilePath::CreateDirectoriesRecursively() const { in CreateDirectoriesRecursively()
342 const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); in CreateDirectoriesRecursively()
350 bool FilePath::CreateFolder() const { in CreateFolder()
352 FilePath removed_sep(this->RemoveTrailingPathSeparator()); in CreateFolder()
375 FilePath FilePath::RemoveTrailingPathSeparator() const { in RemoveTrailingPathSeparator()
376 return IsDirectory() ? FilePath(pathname_.substr(0, pathname_.length() - 1)) in RemoveTrailingPathSeparator()
384 void FilePath::Normalize() { in Normalize()