diff options
author | 2011-09-14 15:07:05 -0700 | |
---|---|---|
committer | 2011-09-15 11:22:16 -0700 | |
commit | 0b3ec5d32f15bdea67d15af95cf68e455867c668 (patch) | |
tree | 424f7ad6c56edc405aadab264f55c7de3a43d417 /tools/atree/files.h | |
parent | 4d7ddab160ba29247225e11c2092dcfd68bd6baf (diff) |
Add rm and strip abilities to atree.
The new line syntax is:
[SRC] [rm|strip] DEST
This allows one to write things like this in atree:
bin/src
bin/src bin/dest
bin/src "bin/another file name"
rm dest/file
rm dest/dir # recursive
strip bin/src
bin/src strip bin/dest
Src and dest can contain spaces if full enclosed in double-quotes.
The strip command can be overridden using the STRIP env var.
Change-Id: I22aae7a87c36c082e1aab87132099a3c644914da
Diffstat (limited to 'tools/atree/files.h')
-rw-r--r-- | tools/atree/files.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/atree/files.h b/tools/atree/files.h index 6480c988cf..f6bf8a6ad5 100644 --- a/tools/atree/files.h +++ b/tools/atree/files.h @@ -8,8 +8,16 @@ using namespace std; +enum FileOpType { + FILE_OP_COPY = 0, + FILE_OP_REMOVE, + FILE_OP_STRIP +}; + struct FileRecord { + FileRecord(); + string listFile; int listLine; @@ -18,9 +26,12 @@ struct FileRecord string sourcePath; bool sourceIsDir; time_t sourceMod; + off_t sourceSize; + FileOpType fileOp; string outName; string outPath; + off_t outSize; time_t outMod; bool outIsDir; unsigned int mode; |