about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-09-17T14·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-09-17T14·52+0000
commitf32fef1b075f63ecf8c7351c5e67d4dd95c0fb80 (patch)
treef43b345933e83b54ec1c0ffa59cadf8e3b851666 /src/libstore/store-api.hh
parent4af2fdba6d709d0b9bb77dd58ceb6e16d6cd4cfa (diff)
* GC option `--max-atime' that specifies an upper limit to the last
  accessed time of paths that may be deleted.  Anything more recently
  used won't be deleted.  The time is specified in time_t,
  e.g. seconds since 1970-01-01 00:00:00 UTC; use `date +%s' to
  convert to time_t from the command line. 

  Example: to delete everything that hasn't been used in the last two
  months:

  $ nix-store --gc -v --max-atime $(date +%s -d "2 months ago")
  

Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 3c32003cb49c..ed7e60146029 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -75,6 +75,10 @@ struct GCOptions
        atime. */
     bool useAtime;
 
+    /* Do not delete paths newer than `maxAtime'.  -1 means no age
+       limit. */
+    time_t maxAtime;
+
     GCOptions();
 };