22 struct fuse_file_info *fi) {
36 struct sfuse_fs *fs = fuse_get_context()->private_data;
52 off_t offset,
struct fuse_file_info *fi,
53 enum fuse_readdir_flags flags) {
57 return fs_readdir(fs, path, buf, filler, offset);
82static int sfuse_read_cb(
const char *path,
char *buf,
size_t size, off_t offset,
83 struct fuse_file_info *fi) {
85 return fs_read(fs, path, buf, size, offset);
99 off_t offset,
struct fuse_file_info *fi) {
101 return fs_write(fs, path, buf, size, offset);
113 struct fuse_file_info *fi) {
161 unsigned int flags) {
176 struct fuse_file_info *fi) {
191 struct fuse_file_info *fi) {
219 struct fuse_file_info *fi) {
222 return fs_fsync(fs, path, datasync, fi);
233 static struct fuse_operations ops;
234 memset(&ops, 0,
sizeof(ops));
int fs_getattr(struct sfuse_fs *fs, const char *path, struct stat *stbuf)
파일/디렉터리 속성 조회
int fs_mkdir(struct sfuse_fs *fs, const char *path, mode_t mode)
디렉터리 생성
int fs_read(struct sfuse_fs *fs, const char *path, char *buf, size_t size, off_t offset)
파일 읽기
int fs_create(struct sfuse_fs *fs, const char *path, mode_t mode, struct fuse_file_info *fi)
파일 생성
int fs_truncate(struct sfuse_fs *fs, const char *path, off_t size)
파일 크기 조정 (truncate)
int fs_utimens(struct sfuse_fs *fs, const char *path, const struct timespec tv[2])
파일의 시간 속성 변경 (utimens)
int fs_rmdir(struct sfuse_fs *fs, const char *path)
디렉터리 삭제
int fs_open(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi)
파일 열기
int fs_fsync(struct sfuse_fs *fs, const char *path, int datasync, struct fuse_file_info *fi)
FUSE에서 fsync 요청 처리
int fs_unlink(struct sfuse_fs *fs, const char *path)
파일 삭제
int fs_readdir(struct sfuse_fs *fs, const char *path, void *buf, fuse_fill_dir_t filler, off_t offset)
디렉터리 내용 읽기
int fs_access(struct sfuse_fs *fs, const char *path, int mask)
접근 권한 검사
int fs_write(struct sfuse_fs *fs, const char *path, const char *buf, size_t size, off_t offset)
파일 쓰기
int fs_rename(struct sfuse_fs *fs, const char *from, const char *to)
파일 또는 디렉터리 이름 변경
int fs_flush(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi)
FUSE에서 플러시 요청 처리
static int sfuse_truncate_cb(const char *path, off_t size, struct fuse_file_info *fi)
파일 크기 변경 콜백
static int sfuse_fsync_cb(const char *path, int datasync, struct fuse_file_info *fi)
fsync 콜백
static int sfuse_read_cb(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
파일 읽기 콜백
static int sfuse_open_cb(const char *path, struct fuse_file_info *fi)
파일 열기 콜백
static int sfuse_rename_cb(const char *from, const char *to, unsigned int flags)
이름 변경 콜백
static int sfuse_getattr_cb(const char *path, struct stat *stbuf, struct fuse_file_info *fi)
파일/디렉터리 속성 조회 콜백
static int sfuse_create_cb(const char *path, mode_t mode, struct fuse_file_info *fi)
파일 생성 콜백
static int sfuse_utimens_cb(const char *path, const struct timespec tv[2], struct fuse_file_info *fi)
파일/디렉터리 타임스탬프 갱신 콜백
struct fuse_operations * sfuse_get_operations(void)
FUSE operations 테이블 반환
static int sfuse_unlink_cb(const char *path)
파일 삭제 콜백
static int sfuse_write_cb(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
파일 쓰기 콜백
static int sfuse_mkdir_cb(const char *path, mode_t mode)
디렉터리 생성 콜백
static int sfuse_readdir_cb(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags flags)
디렉터리 목록 조회 콜백
static int sfuse_access_cb(const char *path, int mask)
access 콜백
static int sfuse_rmdir_cb(const char *path)
디렉터리 삭제 콜백
static int sfuse_flush_cb(const char *path, struct fuse_file_info *fi)
flush 콜백