Other APIs - suffuse/suffuse GitHub Wiki

Some filesystem APIs

native libfuse

"Implementing a filesystem is simple, a hello world filesystem is less than a 100 lines long."

def access(path: String, access: Int): Int
def bmap(path: String, info: FInfo): Int
def chmod(path: String, mode: MInfo): Int
def chown(path: String, uid: Long, gid: Long): Int
def create(path: String, mode: MInfo, info: FInfo): Int
def destroy(): Unit
def fgetattr(path: String, stat: SInfo, info: FInfo): Int
def flush(path: String, info: FInfo): Int
def fsync(path: String, datasync: Int, info: FInfo): Int
def fsyncdir(path: String, datasync: Int, info: FInfo): Int
def ftruncate(path: String, offset: Long, info: FInfo): Int
def getattr(path: String, stat: SInfo): Int
def getxattr(path: String, xattr: String, filler: XattrFiller, size: Long, pos: Long): Int
def init(): Unit
def link(path: String, target: String): Int
def listxattr(path: String, filler: XattrListFiller): Int
def lock(path: String, info: FInfo, command: FlockCommand, flock: FlockWrapper): Int
def mkdir(path: String, mode: MInfo): Int
def mknod(path: String, mode: MInfo, dev: Long): Int
def open(path: String, info: FInfo): Int
def opendir(path: String, info: FInfo): Int
def read(path: String, buffer: Buf, size: Long, offset: Long, info: FInfo): Int
def readdir(path: String, filler: DirectoryFiller): Int
def readlink(path: String, buffer: Buf, size: Long): Int
def release(path: String, info: FInfo): Int
def releasedir(path: String, info: FInfo): Int
def removexattr(path: String, xattr: String): Int
def rename(path: String, newName: String): Int
def rmdir(path: String): Int
def setxattr(path: String, xattr: String, value: Buf, size: Long, flags: Int, pos: Int): Int
def statfs(path: String, wrapper: StatvfsWrapper): Int
def symlink(path: String, target: String): Int
def truncate(path: String, offset: Long): Int
def unlink(path: String): Int
def utimens(path: String, wrapper: TimeBufferWrapper): Int
def write(path: String, buf: Buf, bufSize: Long, writeOffset: Long, info: FInfo): Int

libuv

int uv_fs_access(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file file, int mode, uv_fs_cb cb)
int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file file, int64_t offset, uv_fs_cb cb)
int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime, double mtime, uv_fs_cb cb)
int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb)
int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, uv_fs_cb cb)
int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, int mode, uv_fs_cb cb)
int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb)
int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
int uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_cb cb)
int uv_fs_scandir_next(uv_fs_t* req, uv_dirent_t* ent)
int uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file out_fd, uv_file in_fd, int64_t in_offset, size_t length, uv_fs_cb cb)
int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, int flags, uv_fs_cb cb)
int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, double mtime, uv_fs_cb cb)
int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
void uv_fs_req_cleanup(uv_fs_t* req)