Blob


1 #ifndef _FS_H_
2 #define _FS_H_ 1
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 /*
8 * Simple user-level 9P client.
9 */
11 typedef struct Fsys Fsys;
12 typedef struct Fid Fid;
14 Fsys *fsinit(int);
15 Fsys *fsmount(int, char*);
17 int fsversion(Fsys*, int, char*, int);
18 Fid *fsauth(Fsys*, char*);
19 Fid *fsattach(Fsys*, Fid*, char*, char*);
20 Fid *fsopen(Fsys*, char*, int);
21 int fsopenfd(Fsys*, char*, int);
22 long fsread(Fid*, void*, long);
23 long fsreadn(Fid*, void*, long);
24 long fswrite(Fid*, void*, long);
25 void fsclose(Fid*);
26 void fsunmount(Fsys*);
27 int fsrpc(Fsys*, Fcall*, Fcall*, void**);
28 Fid *fswalk(Fid*, char*);
29 struct Dir; /* in case there's no lib9.h */
30 long fsdirread(Fid*, struct Dir**);
31 long fsdirreadall(Fid*, struct Dir**);
32 struct Dir *fsdirstat(Fsys*, char*);
33 struct Dir *fsdirfstat(Fid*);
34 int fsdirwstat(Fsys*, char*, struct Dir*);
35 int fsdirfwstat(Fid*, struct Dir*);
36 Fid *fsroot(Fsys*);
37 Fsys *nsmount(char*, char*);
39 #ifdef __cplusplus
40 }
41 #endif
42 #endif