| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/basictypes.h" |
| 5 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/platform_file.h" |
| 6 | 8 |
| 7 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 8 #include <io.h> | 10 #include <io.h> |
| 9 #endif | 11 #endif |
| 10 #include <stdio.h> | 12 #include <stdio.h> |
| 11 | 13 #include <string.h> |
| 14 #include <sys/stat.h> |
| 15 #include <unistd.h> |
| 12 #include <fstream> | 16 #include <fstream> |
| 17 #include <ios> |
| 18 #include <string> |
| 13 | 19 |
| 14 #include "base/file_path.h" | 20 #include "base/file_path.h" |
| 15 #include "base/logging.h" | 21 #include "base/logging.h" |
| 16 #include "base/string_piece.h" | |
| 17 #include "base/string_util.h" | 22 #include "base/string_util.h" |
| 18 #include "base/utf_string_conversions.h" | |
| 19 | 23 |
| 20 namespace { | 24 namespace { |
| 21 | 25 |
| 22 const FilePath::CharType kExtensionSeparator = FILE_PATH_LITERAL('.'); | 26 const FilePath::CharType kExtensionSeparator = FILE_PATH_LITERAL('.'); |
| 23 | 27 |
| 24 } // namespace | 28 } // namespace |
| 25 | 29 |
| 26 namespace file_util { | 30 namespace file_util { |
| 27 | 31 |
| 28 bool EndsWithSeparator(const FilePath& path) { | 32 bool EndsWithSeparator(const FilePath& path) { |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 // FileEnumerator | 405 // FileEnumerator |
| 402 // | 406 // |
| 403 // Note: the main logic is in file_util_<platform>.cc | 407 // Note: the main logic is in file_util_<platform>.cc |
| 404 | 408 |
| 405 bool FileEnumerator::ShouldSkip(const FilePath& path) { | 409 bool FileEnumerator::ShouldSkip(const FilePath& path) { |
| 406 FilePath::StringType basename = path.BaseName().value(); | 410 FilePath::StringType basename = path.BaseName().value(); |
| 407 return IsDot(path) || (IsDotDot(path) && !(INCLUDE_DOT_DOT & file_type_)); | 411 return IsDot(path) || (IsDotDot(path) && !(INCLUDE_DOT_DOT & file_type_)); |
| 408 } | 412 } |
| 409 | 413 |
| 410 } // namespace | 414 } // namespace |
| OLD | NEW |