xref: /minix/minix/lib/libvboxfs/proto.h (revision 9f988b79)
1 /* Part of libvboxfs - (c) 2012, D.C. van Moolenbroek */
2 
3 #ifndef _VBOXFS_PROTO_H
4 #define _VBOXFS_PROTO_H
5 
6 /* attr.c */
7 void vboxfs_get_attr(struct sffs_attr *attr, vboxfs_objinfo_t *info);
8 int vboxfs_getattr(const char *path, struct sffs_attr *attr);
9 int vboxfs_setattr(const char *path, struct sffs_attr *attr);
10 
11 /* dir.c */
12 int vboxfs_opendir(const char *path, sffs_dir_t *handle);
13 int vboxfs_readdir(sffs_dir_t handle, unsigned int index, char *buf,
14 	size_t size, struct sffs_attr *attr);
15 int vboxfs_closedir(sffs_dir_t handle);
16 
17 /* file.c */
18 int vboxfs_open(const char *path, int flags, int mode, sffs_file_t *handle);
19 ssize_t vboxfs_read(sffs_file_t handle, char *buf, size_t size, u64_t pos);
20 ssize_t vboxfs_write(sffs_file_t handle, char *buf, size_t len, u64_t pos);
21 int vboxfs_close(sffs_file_t handle);
22 size_t vboxfs_buffer(char **ptr);
23 
24 /* handle.c */
25 int vboxfs_open_file(const char *path, int flags, int mode,
26 	vboxfs_handle_t *handlep, vboxfs_objinfo_t *infop);
27 void vboxfs_close_file(vboxfs_handle_t handle);
28 
29 /* info.c */
30 int vboxfs_getset_info(vboxfs_handle_t handle, u32_t flags, void *data,
31 	size_t size);
32 int vboxfs_query_vol(const char *path, vboxfs_volinfo_t *volinfo);
33 int vboxfs_queryvol(const char *path, u64_t *free, u64_t *total);
34 
35 /* link.c */
36 int vboxfs_mkdir(const char *path, int mode);
37 int vboxfs_unlink(const char *path);
38 int vboxfs_rmdir(const char *path);
39 int vboxfs_rename(const char *opath, const char *npath);
40 
41 /* path.c */
42 int vboxfs_set_path(vboxfs_path_t *path, const char *name);
43 int vboxfs_get_path(vboxfs_path_t *path, char *name, size_t size);
44 size_t vboxfs_get_path_size(vboxfs_path_t *path);
45 
46 #endif /* !_VBOXFS_PROTO_H */
47