type FileSystemInterface interface { // Init is called when the file system is created. Init()
// Destroy is called when the file system is destroyed. Destroy()
// Statfs gets file system statistics. Statfs(path string, stat *Statfs_t) int
// Mknod creates a file node. Mknod(path string, mode uint32, dev uint64) int
// Mkdir creates a directory. Mkdir(path string, mode uint32) int
// Unlink removes a file. Unlink(path string) int
// Rmdir removes a directory. Rmdir(path string) int
// Link creates a hard link to a file. Link(oldpath string, newpath string) int
// Symlink creates a symbolic link. Symlink(target string, newpath string) int
// Readlink reads the target of a symbolic link. Readlink(path string) (int, string)
// Rename renames a file. Rename(oldpath string, newpath string) int
// Chmod changes the permission bits of a file. Chmod(path string, mode uint32) int
// Chown changes the owner and group of a file. Chown(path string, uid uint32, gid uint32) int
// Utimens changes the access and modification times of a file. Utimens(path string, tmsp []Timespec) int
// Access checks file access permissions. Access(path string, mask uint32) int
// Create creates and opens a file. // The flags are a combination of the fuse.O_* constants. Create(path string, flags int, mode uint32) (int, uint64)
// Open opens a file. // The flags are a combination of the fuse.O_* constants. Open(path string, flags int) (int, uint64)
// Getattr gets file attributes. Getattr(path string, stat *Stat_t, fh uint64) int
// Truncate changes the size of a file. Truncate(path string, size int64, fh uint64) int
// Read reads data from a file. Read(path string, buff []byte, ofst int64, fh uint64) int
// Write writes data to a file. Write(path string, buff []byte, ofst int64, fh uint64) int
// Flush flushes cached file data. Flush(path string, fh uint64) int
// Release closes an open file. Release(path string, fh uint64) int
// Fsync synchronizes file contents. Fsync(path string, datasync bool, fh uint64) int
// Opendir opens a directory. Opendir(path string) (int, uint64)
// Readdir reads a directory. Readdir(path string, fill func(name string, stat *Stat_t, ofst int64) bool, ofst int64, fh uint64) int
// Releasedir closes an open directory. Releasedir(path string, fh uint64) int
// Fsyncdir synchronizes directory contents. Fsyncdir(path string, datasync bool, fh uint64) int
// Setxattr sets extended attributes. Setxattr(path string, name string, value []byte, flags int) int
// Getxattr gets extended attributes. Getxattr(path string, name string) (int, []byte)
// Removexattr removes extended attributes. Removexattr(path string, name string) int
// Listxattr lists extended attributes. Listxattr(path string, fill func(name string) bool) int }
|