1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#pragma once
#include "lite_fs.h"
#include "logger.h"
#include "myutils.h"
#include "platform.h"
#include <fuse.h>
namespace securefs
{
namespace lite
{
void init_fuse_operations(struct fuse_operations* opt, bool xattr);
int statfs(const char*, struct fuse_statvfs*);
void* init(struct fuse_conn_info*);
void destroy(void* ptr);
int getattr(const char*, struct fuse_stat*);
int opendir(const char*, struct fuse_file_info*);
int releasedir(const char*, struct fuse_file_info*);
int readdir(const char*, void*, fuse_fill_dir_t, fuse_off_t, struct fuse_file_info*);
int create(const char*, fuse_mode_t, struct fuse_file_info*);
int open(const char*, struct fuse_file_info*);
int release(const char*, struct fuse_file_info*);
int read(const char*, char*, size_t, fuse_off_t, struct fuse_file_info*);
int write(const char*, const char*, size_t, fuse_off_t, struct fuse_file_info*);
int flush(const char*, struct fuse_file_info*);
int truncate(const char*, fuse_off_t);
int ftruncate(const char*, fuse_off_t, struct fuse_file_info*);
int unlink(const char*);
int mkdir(const char*, fuse_mode_t);
int rmdir(const char*);
int chmod(const char*, fuse_mode_t);
int symlink(const char* to, const char* from);
int link(const char* src, const char* dest);
int readlink(const char* path, char* buf, size_t size);
int rename(const char*, const char*);
int fsync(const char* path, int isdatasync, struct fuse_file_info* fi);
int utimens(const char* path, const struct fuse_timespec ts[2]);
#ifdef __APPLE__
int listxattr(const char* path, char* list, size_t size);
int getxattr(const char* path, const char* name, char* value, size_t size, uint32_t position);
int setxattr(const char* path,
const char* name,
const char* value,
size_t size,
int flags,
uint32_t position);
int removexattr(const char* path, const char* name);
#endif
} // namespace lite
} // namespace securefs
|