Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: base/files/file_enumerator.h

Issue 1549853002: Switch to standard integer types in base/files/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/files/file.cc ('k') | base/files/file_enumerator_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_FILES_FILE_ENUMERATOR_H_ 5 #ifndef BASE_FILES_FILE_ENUMERATOR_H_
6 #define BASE_FILES_FILE_ENUMERATOR_H_ 6 #define BASE_FILES_FILE_ENUMERATOR_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <stack> 11 #include <stack>
9 #include <vector> 12 #include <vector>
10 13
11 #include "base/base_export.h" 14 #include "base/base_export.h"
12 #include "base/basictypes.h"
13 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/macros.h"
14 #include "base/time/time.h" 17 #include "base/time/time.h"
15 #include "build/build_config.h" 18 #include "build/build_config.h"
16 19
17 #if defined(OS_WIN) 20 #if defined(OS_WIN)
18 #include <windows.h> 21 #include <windows.h>
19 #elif defined(OS_POSIX) 22 #elif defined(OS_POSIX)
20 #include <sys/stat.h> 23 #include <sys/stat.h>
21 #include <unistd.h> 24 #include <unistd.h>
22 #endif 25 #endif
23 26
(...skipping 18 matching lines...) Expand all
42 FileInfo(); 45 FileInfo();
43 ~FileInfo(); 46 ~FileInfo();
44 47
45 bool IsDirectory() const; 48 bool IsDirectory() const;
46 49
47 // The name of the file. This will not include any path information. This 50 // The name of the file. This will not include any path information. This
48 // is in constrast to the value returned by FileEnumerator.Next() which 51 // is in constrast to the value returned by FileEnumerator.Next() which
49 // includes the |root_path| passed into the FileEnumerator constructor. 52 // includes the |root_path| passed into the FileEnumerator constructor.
50 FilePath GetName() const; 53 FilePath GetName() const;
51 54
52 int64 GetSize() const; 55 int64_t GetSize() const;
53 Time GetLastModifiedTime() const; 56 Time GetLastModifiedTime() const;
54 57
55 #if defined(OS_WIN) 58 #if defined(OS_WIN)
56 // Note that the cAlternateFileName (used to hold the "short" 8.3 name) 59 // Note that the cAlternateFileName (used to hold the "short" 8.3 name)
57 // of the WIN32_FIND_DATA will be empty. Since we don't use short file 60 // of the WIN32_FIND_DATA will be empty. Since we don't use short file
58 // names, we tell Windows to omit it which speeds up the query slightly. 61 // names, we tell Windows to omit it which speeds up the query slightly.
59 const WIN32_FIND_DATA& find_data() const { return find_data_; } 62 const WIN32_FIND_DATA& find_data() const { return find_data_; }
60 #elif defined(OS_POSIX) 63 #elif defined(OS_POSIX)
61 const struct stat& stat() const { return stat_; } 64 const struct stat& stat() const { return stat_; }
62 #endif 65 #endif
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // A stack that keeps track of which subdirectories we still need to 153 // A stack that keeps track of which subdirectories we still need to
151 // enumerate in the breadth-first search. 154 // enumerate in the breadth-first search.
152 std::stack<FilePath> pending_paths_; 155 std::stack<FilePath> pending_paths_;
153 156
154 DISALLOW_COPY_AND_ASSIGN(FileEnumerator); 157 DISALLOW_COPY_AND_ASSIGN(FileEnumerator);
155 }; 158 };
156 159
157 } // namespace base 160 } // namespace base
158 161
159 #endif // BASE_FILES_FILE_ENUMERATOR_H_ 162 #endif // BASE_FILES_FILE_ENUMERATOR_H_
OLDNEW
« no previous file with comments | « base/files/file.cc ('k') | base/files/file_enumerator_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698