cctools
|
00001 /* 00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin 00003 Copyright (C) 2005- The University of Notre Dame 00004 This software is distributed under the GNU General Public License. 00005 See the file COPYING for details. 00006 */ 00007 00008 #ifndef FILE_CACHE_H 00009 #define FILE_CACHE_H 00010 00011 #include <sys/types.h> 00012 00013 #include "int_sizes.h" 00014 00015 struct file_cache *file_cache_init(const char *root); 00016 void file_cache_fini(struct file_cache *c); 00017 void file_cache_cleanup(struct file_cache *c); 00018 00019 int file_cache_open(struct file_cache *c, const char *path, char *lpath, INT64_T size, time_t mtime); 00020 int file_cache_delete(struct file_cache *f, const char *path); 00021 int file_cache_contains(struct file_cache *f, const char *path, char *lpath); 00022 00023 int file_cache_begin(struct file_cache *c, const char *path, char *txn); 00024 int file_cache_commit(struct file_cache *c, const char *path, const char *txn); 00025 int file_cache_abort(struct file_cache *c, const char *path, const char *txn); 00026 00027 #endif