Lines Matching refs:FilePath
85 FilePath FilePath::GetCurrentDir() { in GetCurrentDir()
89 return FilePath(kCurrentDirectoryString); in GetCurrentDir()
92 return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); in GetCurrentDir()
95 return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); in GetCurrentDir()
103 FilePath FilePath::RemoveExtension(const char* extension) const { in RemoveExtension()
106 return FilePath(String(pathname_.c_str(), pathname_.length() - 4)); in RemoveExtension()
117 FilePath FilePath::RemoveDirectoryName() const { in RemoveDirectoryName()
119 return last_sep ? FilePath(String(last_sep + 1)) : *this; in RemoveDirectoryName()
128 FilePath FilePath::RemoveFileName() const { in RemoveFileName()
136 return FilePath(dir); in RemoveFileName()
145 FilePath FilePath::MakeFileName(const FilePath& directory, in MakeFileName()
146 const FilePath& base_name, in MakeFileName()
155 return ConcatPaths(directory, FilePath(file)); in MakeFileName()
160 FilePath FilePath::ConcatPaths(const FilePath& directory, in ConcatPaths()
161 const FilePath& relative_path) { in ConcatPaths()
164 const FilePath dir(directory.RemoveTrailingPathSeparator()); in ConcatPaths()
165 return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator, in ConcatPaths()
171 bool FilePath::FileOrDirectoryExists() const { in FileOrDirectoryExists()
185 bool FilePath::DirectoryExists() const { in DirectoryExists()
190 const FilePath& path(IsRootDirectory() ? *this : in DirectoryExists()
193 const FilePath& path(*this); in DirectoryExists()
215 bool FilePath::IsRootDirectory() const { in IsRootDirectory()
227 bool FilePath::IsAbsolutePath() const { in IsAbsolutePath()
248 FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, in GenerateUniqueFileName()
249 const FilePath& base_name, in GenerateUniqueFileName()
251 FilePath full_pathname; in GenerateUniqueFileName()
262 bool FilePath::IsDirectory() const { in IsDirectory()
269 bool FilePath::CreateDirectoriesRecursively() const { in CreateDirectoriesRecursively()
278 const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); in CreateDirectoriesRecursively()
286 bool FilePath::CreateFolder() const { in CreateFolder()
288 FilePath removed_sep(this->RemoveTrailingPathSeparator()); in CreateFolder()
307 FilePath FilePath::RemoveTrailingPathSeparator() const { in RemoveTrailingPathSeparator()
309 ? FilePath(String(pathname_.c_str(), pathname_.length() - 1)) in RemoveTrailingPathSeparator()
316 void FilePath::Normalize() { in Normalize()