blob: 6b1a1516e754764ae5825b2cc77ad10892473294 [file] [log] [blame]
Miklos Szeredi85c74fc2001-10-28 19:44:14 +00001/*
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
14struct fuse;
15struct fuse_dh;
16
17typedef int (*dirfiller_t) (struct fuse_dh *, const char *, int type);
18
19
20struct 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
27struct fuse *fuse_new();
28
29int fuse_mount(struct fuse *f, const char *dir);
30
31void fuse_set_operations(struct fuse *f, const struct fuse_operations *op);
32
33void fuse_loop(struct fuse *f);
34
35int fuse_unmount(struct fuse *f);
36
37void fuse_destroy(struct fuse *f);