Lines Matching refs:FilePath
100 FilePath FilePath::GetCurrentDir() { in GetCurrentDir()
104 return FilePath(kCurrentDirectoryString); in GetCurrentDir()
107 return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); in GetCurrentDir()
110 return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); in GetCurrentDir()
118 FilePath FilePath::RemoveExtension(const char* extension) const { in RemoveExtension()
121 return FilePath(String(pathname_.c_str(), pathname_.length() - 4)); in RemoveExtension()
129 const char* FilePath::FindLastPathSeparator() const { in FindLastPathSeparator()
148 FilePath FilePath::RemoveDirectoryName() const { in RemoveDirectoryName()
150 return last_sep ? FilePath(String(last_sep + 1)) : *this; in RemoveDirectoryName()
159 FilePath FilePath::RemoveFileName() const { in RemoveFileName()
167 return FilePath(dir); in RemoveFileName()
176 FilePath FilePath::MakeFileName(const FilePath& directory, in MakeFileName()
177 const FilePath& base_name, in MakeFileName()
186 return ConcatPaths(directory, FilePath(file)); in MakeFileName()
191 FilePath FilePath::ConcatPaths(const FilePath& directory, in ConcatPaths()
192 const FilePath& relative_path) { in ConcatPaths()
195 const FilePath dir(directory.RemoveTrailingPathSeparator()); in ConcatPaths()
196 return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator, in ConcatPaths()
202 bool FilePath::FileOrDirectoryExists() const { in FileOrDirectoryExists()
216 bool FilePath::DirectoryExists() const { in DirectoryExists()
221 const FilePath& path(IsRootDirectory() ? *this : in DirectoryExists()
224 const FilePath& path(*this); in DirectoryExists()
246 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(String(pathname_.c_str(), pathname_.length() - 1)) in RemoveTrailingPathSeparator()
349 void FilePath::Normalize() { in Normalize()