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

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

Issue 14824005: Revert 198824 "Export FileInfo" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 <stack> 8 #include <stack>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 // 30 //
31 // Example: 31 // Example:
32 // 32 //
33 // base::FileEnumerator enum(my_dir, false, base::FileEnumerator::FILES, 33 // base::FileEnumerator enum(my_dir, false, base::FileEnumerator::FILES,
34 // FILE_PATH_LITERAL("*.txt")); 34 // FILE_PATH_LITERAL("*.txt"));
35 // for (base::FilePath name = enum.Next(); !name.empty(); name = enum.Next()) 35 // for (base::FilePath name = enum.Next(); !name.empty(); name = enum.Next())
36 // ... 36 // ...
37 class BASE_EXPORT FileEnumerator { 37 class BASE_EXPORT FileEnumerator {
38 public: 38 public:
39 // Note: copy & assign supported. 39 // Note: copy & assign supported.
40 class BASE_EXPORT FileInfo { 40 class FileInfo {
41 public: 41 public:
42 FileInfo(); 42 FileInfo();
43 ~FileInfo(); 43 ~FileInfo();
44 44
45 bool IsDirectory() const; 45 bool IsDirectory() const;
46 46
47 // The name of the file. This will not include any path information. This 47 // 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 48 // is in constrast to the value returned by FileEnumerator.Next() which
49 // includes the |root_path| passed into the FileEnumerator constructor. 49 // includes the |root_path| passed into the FileEnumerator constructor.
50 FilePath GetName() const; 50 FilePath GetName() const;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // A stack that keeps track of which subdirectories we still need to 147 // A stack that keeps track of which subdirectories we still need to
148 // enumerate in the breadth-first search. 148 // enumerate in the breadth-first search.
149 std::stack<FilePath> pending_paths_; 149 std::stack<FilePath> pending_paths_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(FileEnumerator); 151 DISALLOW_COPY_AND_ASSIGN(FileEnumerator);
152 }; 152 };
153 153
154 } // namespace base 154 } // namespace base
155 155
156 #endif // BASE_FILES_FILE_ENUMERATOR_H_ 156 #endif // BASE_FILES_FILE_ENUMERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698