From 0b3ec5d32f15bdea67d15af95cf68e455867c668 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 14 Sep 2011 15:07:05 -0700 Subject: 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 --- tools/atree/files.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools/atree/files.h') 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; -- cgit v1.2.3-59-g8ed1b