当前位置: 首页 > 工具软件 > Opendedup > 使用案例 >

opendedup(sdfs)源码分析3之Filesystem3篇

谭学名
2023-12-01

Filesystem3接口继承自FilesystemConstants接口,其中有以下成员:

public int getattr(String path, FuseGetattrSetter getattrSetter)
   throws FuseException;

 

 public int readlink(String path, CharBuffer link) throws FuseException;

 

 public int getdir(String path, FuseDirFiller dirFiller)
   throws FuseException;

 

 public int mknod(String path, int mode, int rdev) throws FuseException;

 

 public int mkdir(String path, int mode) throws FuseException;

 

 public int unlink(String path) throws FuseException;

 

 public int rmdir(String path) throws FuseException;

 

 public int symlink(String from, String to) throws FuseException;

 

 public int rename(String from, String to) throws FuseException;

 

 public int link(String from, String to) throws FuseException;

 

 public int chmod(String path, int mode) throws FuseException;

 

 public int chown(String path, int uid, int gid) throws FuseException;

 

 public int truncate(String path, long size) throws FuseException;

 

 public int utime(String path, int atime, int mtime) throws FuseException;

 

 public int statfs(FuseStatfsSetter statfsSetter) throws FuseException;

 

  public int open(String path, int flags, FuseOpenSetter openSetter)
   throws FuseException;

 

 public int read(String path, Object fh, ByteBuffer buf, long offset)
   throws FuseException;

 

 public int write(String path, Object fh, boolean isWritepage,
   ByteBuffer buf, long offset) throws FuseException;

 

 public int flush(String path, Object fh) throws FuseException;

 

 public int release(String path, Object fh, int flags) throws FuseException;

 

 

 public int fsync(String path, Object fh, boolean isDatasync)
   throws FuseException;

这些函数与unix文件系统定义的函数功能类似,此处不再赘述其功能。

 类似资料: