diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-10-03 00:16:07 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-10-03 21:57:39 -0700 |
commit | f06d8019e99ae6aee1d2881f30315aee7b544cfb (patch) | |
tree | 220de431495546566c2d01b931173c0d15af3d16 /func.h | |
parent | 5e45e973c38c92c42cc86aa5dafeca13e6823b5f (diff) | |
download | android_build_kati-f06d8019e99ae6aee1d2881f30315aee7b544cfb.tar.gz android_build_kati-f06d8019e99ae6aee1d2881f30315aee7b544cfb.tar.bz2 android_build_kati-f06d8019e99ae6aee1d2881f30315aee7b544cfb.zip |
Implement the `file` function to read and write files
This allows us to do file reading and writing without $(shell). Besides
being simpler, this also allows faster regen times, since we can just
stat the files to be read, or directly write to the files that need to
be written.
Diffstat (limited to 'func.h')
-rw-r--r-- | func.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -41,7 +41,17 @@ FuncInfo* GetFuncInfo(StringPiece name); struct FindCommand; +enum struct CommandOp { + SHELL, + FIND, + READ, + READ_MISSING, + WRITE, + APPEND, +}; + struct CommandResult { + CommandOp op; string shell; string cmd; unique_ptr<FindCommand> find; |