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