FUSE filesystem support.
[libguestfs.git] / fuse / dircache.h
1 /* guestmount - mount guests using libguestfs and FUSE
2  * Copyright (C) 2009 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  * Derived from the example program 'fusexmp.c':
19  * Copyright (C) 2001-2007  Miklos Szeredi <miklos@szeredi.hu>
20  *
21  * This program can be distributed under the terms of the GNU GPL.
22  * See the file COPYING.
23  */
24
25 #ifndef GUESTMOUNT_DIRCACHE_H
26 #define GUESTMOUNT_DIRCACHE_H 1
27
28 #include <time.h>
29 #include <sys/stat.h>
30 #include <guestfs.h>
31
32 extern void init_dir_caches (void);
33 extern void free_dir_caches (void);
34 extern void dir_cache_remove_all_expired (time_t now);
35 extern void dir_cache_invalidate (const char *path);
36
37 extern int lsc_insert (const char *path, const char *name, time_t now, struct stat const *statbuf);
38 extern int xac_insert (const char *path, const char *name, time_t now, struct guestfs_xattr_list *xattrs);
39 extern int rlc_insert (const char *path, const char *name, time_t now, char *link);
40 extern const struct stat *lsc_lookup (const char *pathname);
41 extern const struct guestfs_xattr_list *xac_lookup (const char *pathname);
42 extern const char *rlc_lookup (const char *pathname);
43
44 #endif /* GUESTMOUNT_DIRCACHE_H */