1 #ifndef _library__filelist__hpp__included__
2 #define _library__filelist__hpp__included__
15 * Create a new list, backed by specific file.
17 filelist(const std::string
& backingfile
, const std::string
& directory
);
23 * Enumerate the files on the list. Files that don't have matching timestamp are auto-removed.
25 std::set
<std::string
> enumerate();
27 * Add a file to the list. Current timestamp is used to mark version.
29 void add(const std::string
& filename
);
31 * Remove a file from the list.
33 void remove(const std::string
& filename
);
35 * Rename a file from the list.
37 void rename(const std::string
& oldname
, const std::string
& newname
);
39 filelist(const filelist
&);
40 filelist
& operator=(const filelist
&);
41 std::map
<std::string
, int64_t> readfile();
42 void check_stale(std::map
<std::string
, int64_t>& data
);
43 void writeback(const std::map
<std::string
, int64_t>& data
);
44 std::string backingfile
;
45 std::string directory
;