Back to index

avfs  1.0.1
Go to the documentation of this file.
00001 /*  
00002     AVFS: A Virtual File System Library
00003     Copyright (C) 1998-1999  Miklos Szeredi <>
00005     This program can be distributed under the terms of the GNU GPL.
00006     See the file COPYING.
00007 */
00009 #ifndef _VIRTUAL_H
00010 #define _VIRTUAL_H
00012 #include <sys/types.h>
00013 #include <dirent.h>
00014 #include <utime.h>
00015 #include <sys/stat.h>
00017 /*
00018   some fs functions which still need virtual equivalents:
00019   fchdir, statfs, sync
00020 */
00022 int            virt_stat      (const char *path, struct stat *buf);
00023 int            virt_lstat     (const char *path, struct stat *buf);
00024 int            virt_access    (const char *path, int amode);
00025 int            virt_readlink  (const char *path, char *buf, size_t bsiz);
00026 int            virt_truncate  (const char *path, off_t length);
00027 int            virt_utime     (const char *path, struct utimbuf *buf);
00028 int            virt_chmod     (const char *path, mode_t mode);
00029 int            virt_chown     (const char *path, uid_t owner, gid_t grp);
00030 int            virt_lchown    (const char *path, uid_t owner, gid_t grp);
00032 int            virt_unlink    (const char *path);
00033 int            virt_rmdir     (const char *path);
00034 int            virt_mkdir     (const char *path, mode_t mode);
00035 int            virt_mknod     (const char *path, mode_t mode, dev_t dev);
00036 int            virt_symlink   (const char *path, const char *newpath);
00037 int            virt_rename    (const char *path, const char *newpath);
00038 int            virt_link      (const char *path, const char *newpath);
00039 int            virt_fstat     (int fh, struct stat *buf);
00040 int            virt_ftruncate (int fh, off_t length);
00041 int            virt_fchmod    (int fh, mode_t mode);
00042 int            virt_fchown    (int fh, uid_t owner, gid_t grp);
00044 int            virt_open      (const char *path, int flags, mode_t mode);
00045 int            virt_close     (int fh);
00046 ssize_t        virt_read      (int fh, void *buf, size_t nbyte);
00047 ssize_t        virt_write     (int fh, const void *buf, size_t nbyte);
00048 off_t          virt_lseek     (int fh, off_t offset, int whence);
00050 DIR           *virt_opendir   (const char *path);
00051 int            virt_closedir  (DIR *dirp);
00052 struct dirent *virt_readdir   (DIR *dirp);
00053 void           virt_rewinddir (DIR *dirp);
00055 int            virt_remove    (const char *path);
00056 int            virt_islocal   (const char *path);
00058 #endif /* _VIRTUAL_H */