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