Miklos Szeredi | 85c74fc | 2001-10-28 19:44:14 +0000 | [diff] [blame^] | 1 | /* |
| 2 | FUSE: Filesystem in Userspace |
| 3 | Copyright (C) 2001 Miklos Szeredi (mszeredi@inf.bme.hu) |
| 4 | |
| 5 | This program can be distributed under the terms of the GNU GPL. |
| 6 | See the file COPYING. |
| 7 | */ |
| 8 | |
| 9 | /* This file defines the library interface of FUSE */ |
| 10 | |
| 11 | #include <sys/types.h> |
| 12 | #include <sys/stat.h> |
| 13 | |
| 14 | struct fuse; |
| 15 | struct fuse_dh; |
| 16 | |
| 17 | typedef int (*dirfiller_t) (struct fuse_dh *, const char *, int type); |
| 18 | |
| 19 | |
| 20 | struct fuse_operations { |
| 21 | int (*getattr) (const char *path, struct stat *stbuf); |
| 22 | int (*readlink) (const char *path, char *buf, size_t size); |
| 23 | int (*mknod) (const char *path, int mode, int rdev); |
| 24 | int (*getdir) (const char *path, struct fuse_dh *h, dirfiller_t filler); |
| 25 | }; |
| 26 | |
| 27 | struct fuse *fuse_new(); |
| 28 | |
| 29 | int fuse_mount(struct fuse *f, const char *dir); |
| 30 | |
| 31 | void fuse_set_operations(struct fuse *f, const struct fuse_operations *op); |
| 32 | |
| 33 | void fuse_loop(struct fuse *f); |
| 34 | |
| 35 | int fuse_unmount(struct fuse *f); |
| 36 | |
| 37 | void fuse_destroy(struct fuse *f); |