summaryrefslogtreecommitdiffstats
path: root/include/fs.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-12-06 18:08:52 +0000
committerrsc <devnull@localhost>2003-12-06 18:08:52 +0000
commitd3df308747ee4d1fcc063a348dcf1146b390bda7 (patch)
treea204b027256ec29b110caaa86100cbd701808b5b /include/fs.h
parente97ceade5e1bba5787e39429384336fa37797906 (diff)
downloadplan9port-d3df308747ee4d1fcc063a348dcf1146b390bda7.tar.gz
plan9port-d3df308747ee4d1fcc063a348dcf1146b390bda7.zip
File system stuff.
Diffstat (limited to 'include/fs.h')
-rw-r--r--include/fs.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h
new file mode 100644
index 00000000..219b2774
--- /dev/null
+++ b/include/fs.h
@@ -0,0 +1,41 @@
+#ifndef _FS_H_
+#define _FS_H_ 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Simple user-level 9P client.
+ */
+
+typedef struct Fsys Fsys;
+typedef struct Fid Fid;
+
+Fsys *fsinit(int);
+Fsys *fsmount(int);
+
+int fsversion(Fsys*, int, char*, int);
+Fid *fsauth(Fsys*, char*);
+Fid *fsattach(Fsys*, Fid*, char*, char*);
+Fid *fsopen(Fsys*, char*, int);
+int fsopenfd(Fsys*, char*, int);
+long fsread(Fid*, void*, long);
+long fsreadn(Fid*, void*, long);
+long fswrite(Fid*, void*, long);
+void fsclose(Fid*);
+void fsunmount(Fsys*);
+int fsrpc(Fsys*, Fcall*, Fcall*, void**);
+Fid *fswalk(Fid*, char*);
+struct Dir; /* in case there's no lib9.h */
+long fsdirread(Fid*, struct Dir**);
+long fsdirreadall(Fid*, struct Dir**);
+struct Dir *fsdirstat(Fsys*, char*);
+struct Dir *fsdirfstat(Fid*);
+int fsdirwstat(Fsys*, char*, struct Dir*);
+int fsdirfwstat(Fid*, struct Dir*);
+Fid *fsroot(Fsys*);
+
+#ifdef __cplusplus
+}
+#endif
+#endif