The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | #ifndef FILES_H |
| 2 | #define FILES_H |
| 3 | |
The Android Open Source Project | dcc08f0 | 2008-12-17 18:03:49 -0800 | [diff] [blame] | 4 | #include <map> |
The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 5 | #include <string> |
| 6 | #include <vector> |
| 7 | #include <sys/types.h> |
| 8 | |
| 9 | using namespace std; |
| 10 | |
| 11 | struct FileRecord |
| 12 | { |
| 13 | string listFile; |
| 14 | int listLine; |
| 15 | |
| 16 | string sourceBase; |
| 17 | string sourceName; |
| 18 | string sourcePath; |
| 19 | bool sourceIsDir; |
| 20 | time_t sourceMod; |
| 21 | |
| 22 | string outName; |
| 23 | string outPath; |
| 24 | time_t outMod; |
| 25 | bool outIsDir; |
| 26 | unsigned int mode; |
| 27 | }; |
| 28 | |
The Android Open Source Project | dcc08f0 | 2008-12-17 18:03:49 -0800 | [diff] [blame] | 29 | int read_list_file(const string& filename, |
| 30 | const map<string, string>& variables, |
| 31 | vector<FileRecord>* files, |
| 32 | vector<string>* excludes); |
The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 33 | int locate(FileRecord* rec, const vector<string>& search); |
| 34 | void stat_out(const string& base, FileRecord* rec); |
| 35 | string dir_part(const string& filename); |
| 36 | int list_dir(const FileRecord& rec, const vector<string>& excludes, |
| 37 | vector<FileRecord>* files); |
| 38 | |
| 39 | #endif // FILES_H |