• Home
  • Raw
  • Download

Lines Matching refs:FilePath

22 const FilePath::CharType kExtensionSeparator = FILE_PATH_LITERAL('.');
28 bool EndsWithSeparator(const FilePath& path) { in EndsWithSeparator()
29 FilePath::StringType value = path.value(); in EndsWithSeparator()
33 return FilePath::IsSeparator(value[value.size() - 1]); in EndsWithSeparator()
36 bool EnsureEndsWithSeparator(FilePath* path) { in EnsureEndsWithSeparator()
43 FilePath::StringType& path_str = in EnsureEndsWithSeparator()
44 const_cast<FilePath::StringType&>(path->value()); in EnsureEndsWithSeparator()
45 path_str.append(&FilePath::kSeparators[0], 1); in EnsureEndsWithSeparator()
50 FilePath::StringType GetFileExtensionFromPath(const FilePath& path) { in GetFileExtensionFromPath()
51 FilePath::StringType file_name = path.BaseName().value(); in GetFileExtensionFromPath()
52 const FilePath::StringType::size_type last_dot = in GetFileExtensionFromPath()
54 return FilePath::StringType(last_dot == FilePath::StringType::npos ? in GetFileExtensionFromPath()
59 void InsertBeforeExtension(FilePath* path, const FilePath::StringType& suffix) { in InsertBeforeExtension()
60 FilePath::StringType& value = in InsertBeforeExtension()
61 const_cast<FilePath::StringType&>(path->value()); in InsertBeforeExtension()
63 const FilePath::StringType::size_type last_dot = in InsertBeforeExtension()
65 const FilePath::StringType::size_type last_separator = in InsertBeforeExtension()
66 value.find_last_of(FilePath::StringType(FilePath::kSeparators)); in InsertBeforeExtension()
68 if (last_dot == FilePath::StringType::npos || in InsertBeforeExtension()
79 bool ContentsEqual(const FilePath& filename1, const FilePath& filename2) { in ContentsEqual()
113 bool TextContentsEqual(const FilePath& filename1, const FilePath& filename2) { in TextContentsEqual()
153 bool ReadFileToString(const FilePath& path, std::string* contents) { in ReadFileToString()
170 bool IsDirectoryEmpty(const FilePath& dir_path) { in IsDirectoryEmpty()
179 FILE* CreateAndOpenTemporaryFile(FilePath* path) { in CreateAndOpenTemporaryFile()
180 FilePath directory; in CreateAndOpenTemporaryFile()
187 bool GetFileSize(const FilePath& file_path, int64* file_size) { in GetFileSize()
195 bool IsDot(const FilePath& path) { in IsDot()
199 bool IsDotDot(const FilePath& path) { in IsDotDot()
203 bool TouchFile(const FilePath& path, in TouchFile()
220 bool SetLastModifiedTime(const FilePath& path, in SetLastModifiedTime()
249 bool ContainsPath(const FilePath &parent, const FilePath& child) { in ContainsPath()
250 FilePath abs_parent = FilePath(parent); in ContainsPath()
251 FilePath abs_child = FilePath(child); in ContainsPath()
270 FilePath::kSeparators[0]) in ContainsPath()
276 int64 ComputeDirectorySize(const FilePath& root_path) { in ComputeDirectorySize()
279 for (FilePath current = file_iter.Next(); !current.empty(); in ComputeDirectorySize()
293 int64 ComputeFilesSize(const FilePath& directory, in ComputeFilesSize()
294 const FilePath::StringType& pattern) { in ComputeFilesSize()
297 for (FilePath current = file_iter.Next(); !current.empty(); in ComputeFilesSize()
318 bool MemoryMappedFile::Initialize(const FilePath& file_name) { in Initialize()
348 bool MemoryMappedFile::MapFileToMemory(const FilePath& file_name) { in MapFileToMemory()
370 if (!EndsWithSeparator(FilePath(*path))) in AppendToPath()
371 path->push_back(FilePath::kSeparators[0]); in AppendToPath()
377 return CopyDirectory(FilePath::FromWStringHack(from_path), in CopyDirectory()
378 FilePath::FromWStringHack(to_path), in CopyDirectory()
382 return Delete(FilePath::FromWStringHack(path), recursive); in Delete()
385 FilePath::StringType extension = in GetFileExtensionFromPath()
386 GetFileExtensionFromPath(FilePath::FromWStringHack(path)); in GetFileExtensionFromPath()
390 return OpenFile(FilePath::FromWStringHack(filename), mode); in OpenFile()
393 return ReadFile(FilePath::FromWStringHack(filename), data, size); in ReadFile()
396 return WriteFile(FilePath::FromWStringHack(filename), data, size); in WriteFile()
405 bool FileEnumerator::ShouldSkip(const FilePath& path) { in ShouldSkip()
406 FilePath::StringType basename = path.BaseName().value(); in ShouldSkip()