2003-07-14 10:23:11 +00:00
|
|
|
#ifndef __STORE_H
|
|
|
|
#define __STORE_H
|
2003-06-16 13:33:38 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "hash.hh"
|
2003-08-01 15:41:47 +00:00
|
|
|
#include "db.hh"
|
2003-06-16 13:33:38 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
2003-07-10 15:11:48 +00:00
|
|
|
/* Copy a path recursively. */
|
2003-10-08 15:06:59 +00:00
|
|
|
void copyPath(const Path & src, const Path & dst);
|
2003-06-16 13:33:38 +00:00
|
|
|
|
2003-07-10 15:11:48 +00:00
|
|
|
/* Register a substitute. */
|
2003-10-08 15:06:59 +00:00
|
|
|
void registerSubstitute(const Path & srcPath, const Path & subPath);
|
2003-07-07 09:25:26 +00:00
|
|
|
|
2003-10-08 15:06:59 +00:00
|
|
|
/* Register the validity of a path. */
|
|
|
|
void registerValidPath(const Transaction & txn, const Path & path);
|
2003-07-21 14:46:01 +00:00
|
|
|
|
2003-10-08 15:06:59 +00:00
|
|
|
/* Unregister the validity of a path. */
|
|
|
|
void unregisterValidPath(const Path & path);
|
2003-07-22 15:15:15 +00:00
|
|
|
|
2003-10-08 15:06:59 +00:00
|
|
|
/* Checks whether a path is valid. */
|
|
|
|
bool isValidPath(const Path & path);
|
2003-07-07 09:25:26 +00:00
|
|
|
|
2003-10-08 15:06:59 +00:00
|
|
|
/* Copy the contents of a path to the store and register the validity
|
|
|
|
the resulting path. The resulting path is returned. */
|
|
|
|
Path addToStore(const Path & srcPath);
|
2003-06-23 14:40:49 +00:00
|
|
|
|
2003-06-27 13:55:12 +00:00
|
|
|
/* Delete a value from the nixStore directory. */
|
2003-10-08 15:06:59 +00:00
|
|
|
void deleteFromStore(const Path & path);
|
2003-06-23 14:40:49 +00:00
|
|
|
|
2003-07-17 12:27:55 +00:00
|
|
|
void verifyStore();
|
|
|
|
|
2003-06-16 13:33:38 +00:00
|
|
|
|
2003-07-14 10:23:11 +00:00
|
|
|
#endif /* !__STORE_H */
|