Documentation ¶
Index ¶
- Constants
- func DummyDirGetattr(ctx context.Context, fs *IRODSFS, path string, vpathReadonly bool, ...) syscall.Errno
- func GetFuseOptions(config *commons.Config) *fusefs.Options
- func IRODSGetACL(ctx context.Context, fs *IRODSFS, entry *irodsclient_fs.Entry, readonly bool) os.FileMode
- func IRODSGetOpenFlags(flags uint32) irodsclient_types.FileOpenMode
- func IRODSGetPermission(level irodsclient_types.IRODSAccessLevelType) os.FileMode
- func IRODSGetattr(ctx context.Context, fs *IRODSFS, path string, vpathReadonly bool, ...) syscall.Errno
- func IRODSGetxattr(ctx context.Context, fs *IRODSFS, path string, attr string, dest []byte) (uint32, syscall.Errno)
- func IRODSListxattr(ctx context.Context, fs *IRODSFS, path string, dest []byte) (uint32, syscall.Errno)
- func IRODSLookup(ctx context.Context, fs *IRODSFS, dir *Dir, path string, vpathReadonly bool, ...) (int64, bool, syscall.Errno)
- func IRODSMkdir(ctx context.Context, fs *IRODSFS, dir *Dir, path string, out *fuse.EntryOut) (int64, syscall.Errno)
- func IRODSOpendir(ctx context.Context, fs *IRODSFS, path string) syscall.Errno
- func IRODSReaddir(ctx context.Context, fs *IRODSFS, path string) ([]fuse.DirEntry, syscall.Errno)
- func IRODSRemovexattr(ctx context.Context, fs *IRODSFS, path string, attr string) syscall.Errno
- func IRODSRename(ctx context.Context, fs *IRODSFS, dir *Dir, srcPath string, destPath string) syscall.Errno
- func IRODSRmdir(ctx context.Context, fs *IRODSFS, path string) syscall.Errno
- func IRODSSetxattr(ctx context.Context, fs *IRODSFS, path string, attr string, data []byte) syscall.Errno
- func IRODSStat(ctx context.Context, fs *IRODSFS, path string) (*irodsclient_fs.Entry, error)
- func IRODSUnlink(ctx context.Context, fs *IRODSFS, path string) syscall.Errno
- func IsUnhandledAttr(attr string) bool
- type Dir
- func (dir *Dir) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (*fusefs.Inode, fusefs.FileHandle, uint32, syscall.Errno)
- func (dir *Dir) Fsync(ctx context.Context, fh fusefs.FileHandle, flags uint32) syscall.Errno
- func (dir *Dir) Getattr(ctx context.Context, fh fusefs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (dir *Dir) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)
- func (dir *Dir) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errno)
- func (dir *Dir) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fusefs.Inode, syscall.Errno)
- func (dir *Dir) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fusefs.Inode, syscall.Errno)
- func (dir *Dir) Opendir(ctx context.Context) syscall.Errno
- func (dir *Dir) Readdir(ctx context.Context) (fusefs.DirStream, syscall.Errno)
- func (dir *Dir) Removexattr(ctx context.Context, attr string) syscall.Errno
- func (dir *Dir) Rename(ctx context.Context, name string, newParent fusefs.InodeEmbedder, ...) syscall.Errno
- func (dir *Dir) Rmdir(ctx context.Context, name string) syscall.Errno
- func (dir *Dir) Setattr(ctx context.Context, fh fusefs.FileHandle, in *fuse.SetAttrIn, ...) syscall.Errno
- func (dir *Dir) Setxattr(ctx context.Context, attr string, data []byte, flags uint32) syscall.Errno
- func (dir *Dir) Unlink(ctx context.Context, name string) syscall.Errno
- type File
- func (file *File) Getattr(ctx context.Context, fh fusefs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (file *File) Getlk(ctx context.Context, fh fusefs.FileHandle, owner uint64, lk *fuse.FileLock, ...) syscall.Errno
- func (file *File) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)
- func (file *File) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errno)
- func (file *File) Open(ctx context.Context, flags uint32) (fusefs.FileHandle, uint32, syscall.Errno)
- func (file *File) Removexattr(ctx context.Context, attr string) syscall.Errno
- func (file *File) Setattr(ctx context.Context, fh fusefs.FileHandle, in *fuse.SetAttrIn, ...) syscall.Errno
- func (file *File) Setlk(ctx context.Context, fh fusefs.FileHandle, owner uint64, lk *fuse.FileLock, ...) syscall.Errno
- func (file *File) Setlkw(ctx context.Context, fh fusefs.FileHandle, owner uint64, lk *fuse.FileLock, ...) syscall.Errno
- func (file *File) Setxattr(ctx context.Context, attr string, data []byte, flags uint32) syscall.Errno
- func (file *File) Truncate(ctx context.Context, size uint64) syscall.Errno
- type FileHandle
- func IRODSCreate(ctx context.Context, fs *IRODSFS, dir *Dir, path string, flags uint32, ...) (int64, *FileHandle, syscall.Errno)
- func IRODSOpen(ctx context.Context, fs *IRODSFS, file *File, path string, flags uint32) (*FileHandle, syscall.Errno)
- func IRODSOpenLazy(ctx context.Context, fs *IRODSFS, file *File, path string, flags uint32) (*FileHandle, syscall.Errno)
- func NewFileHandle(fs *IRODSFS, fileHandle irodsfscommon_irods.IRODSFSFileHandle) (*FileHandle, error)
- func NewFileHandleLazy(fs *IRODSFS, path string, openMode irodsclient_types.FileOpenMode) (*FileHandle, error)
- func (handle *FileHandle) Flush(ctx context.Context) syscall.Errno
- func (handle *FileHandle) Fsync(ctx context.Context, flags uint32) syscall.Errno
- func (handle *FileHandle) GetID() string
- func (handle *FileHandle) GetLocalLock(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32, ...) syscall.Errno
- func (handle *FileHandle) GetPath() string
- func (handle *FileHandle) Getattr(ctx context.Context, out *fuse.AttrOut) syscall.Errno
- func (handle *FileHandle) Getlk(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32, ...) syscall.Errno
- func (handle *FileHandle) Read(ctx context.Context, dest []byte, offset int64) (fuse.ReadResult, syscall.Errno)
- func (handle *FileHandle) Release(ctx context.Context) syscall.Errno
- func (handle *FileHandle) SetFile(file *File)
- func (handle *FileHandle) SetLocalLock(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
- func (handle *FileHandle) SetLocalLockW(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
- func (handle *FileHandle) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (handle *FileHandle) Setlk(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
- func (handle *FileHandle) Setlkw(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
- func (handle *FileHandle) Truncate(ctx context.Context, size uint64) syscall.Errno
- func (handle *FileHandle) Write(ctx context.Context, data []byte, offset int64) (uint32, syscall.Errno)
- type FileHandleLocalLock
- type FileHandleLocalLockManager
- type FileHandleMap
- func (fileHandleMap *FileHandleMap) Add(handle *FileHandle)
- func (fileHandleMap *FileHandleMap) Clear()
- func (fileHandleMap *FileHandleMap) Get(id string) *FileHandle
- func (fileHandleMap *FileHandleMap) List() []*FileHandle
- func (fileHandleMap *FileHandleMap) ListByPath(path string) []*FileHandle
- func (fileHandleMap *FileHandleMap) ListPathsInDir(parentPath string) []string
- func (fileHandleMap *FileHandleMap) Pop(id string) *FileHandle
- func (fileHandleMap *FileHandleMap) PopAll() []*FileHandle
- func (fileHandleMap *FileHandleMap) PopByPath(path string) []*FileHandle
- func (fileHandleMap *FileHandleMap) Remove(id string)
- func (fileHandleMap *FileHandleMap) Rename(srcPath string, destPath string)
- func (fileHandleMap *FileHandleMap) RenameDir(srcParentPath string, destParentPath string)
- func (fileHandleMap *FileHandleMap) RenameFile(srcPath string, destPath string)
- type IRODSFS
Constants ¶
const ( FSName string = "irodsfs" Subtype string = "irodsfs" )
Variables ¶
This section is empty.
Functions ¶
func DummyDirGetattr ¶ added in v0.9.0
func DummyDirGetattr(ctx context.Context, fs *IRODSFS, path string, vpathReadonly bool, out *fuse.AttrOut) syscall.Errno
DummyDirGetattr returns an attr for the given irods path
func GetFuseOptions ¶ added in v0.7.9
GetFuseOptions returns fuse options
func IRODSGetACL ¶ added in v0.9.0
func IRODSGetACL(ctx context.Context, fs *IRODSFS, entry *irodsclient_fs.Entry, readonly bool) os.FileMode
IRODSGetACL returns ACL flag from iRODS entry
func IRODSGetOpenFlags ¶ added in v0.9.0
func IRODSGetOpenFlags(flags uint32) irodsclient_types.FileOpenMode
IRODSGetOpenFlags converts file open flags to iRODS file open mode
func IRODSGetPermission ¶ added in v0.9.0
func IRODSGetPermission(level irodsclient_types.IRODSAccessLevelType) os.FileMode
IRODSGetACL returns permission flag from iRODS access level type
func IRODSGetattr ¶ added in v0.9.0
func IRODSGetattr(ctx context.Context, fs *IRODSFS, path string, vpathReadonly bool, out *fuse.AttrOut) syscall.Errno
IRODSGetattr returns an attr for the given irods path
func IRODSGetxattr ¶ added in v0.9.0
func IRODSGetxattr(ctx context.Context, fs *IRODSFS, path string, attr string, dest []byte) (uint32, syscall.Errno)
IRODSGetxattr returns an xattr for the given irods path and attr name
func IRODSListxattr ¶ added in v0.9.0
func IRODSListxattr(ctx context.Context, fs *IRODSFS, path string, dest []byte) (uint32, syscall.Errno)
IRODSListxattr returns all xattrs for the given irods path
func IRODSLookup ¶ added in v0.9.0
func IRODSLookup(ctx context.Context, fs *IRODSFS, dir *Dir, path string, vpathReadonly bool, out *fuse.EntryOut) (int64, bool, syscall.Errno)
IRODSLookup returns entry for the given irods path
func IRODSMkdir ¶ added in v0.9.0
func IRODSMkdir(ctx context.Context, fs *IRODSFS, dir *Dir, path string, out *fuse.EntryOut) (int64, syscall.Errno)
IRODSMkdir removes dir for the given irods path
func IRODSOpendir ¶ added in v0.9.0
IRODSOpendir opens dir for the given irods path
func IRODSReaddir ¶ added in v0.9.0
IRODSReaddir reads dir entries for the given irods path
func IRODSRemovexattr ¶ added in v0.9.0
IRODSRemovexattr unsets an xattr for the given irods path and attr name
func IRODSRename ¶ added in v0.9.0
func IRODSRename(ctx context.Context, fs *IRODSFS, dir *Dir, srcPath string, destPath string) syscall.Errno
IRODSRename renames file or dir for the given irods path
func IRODSRmdir ¶ added in v0.9.0
IRODSRmdir removes dir for the given irods path
func IRODSSetxattr ¶ added in v0.9.0
func IRODSSetxattr(ctx context.Context, fs *IRODSFS, path string, attr string, data []byte) syscall.Errno
IRODSSetxattr sets an xattr for the given irods path and attr name
func IRODSUnlink ¶ added in v0.9.0
IRODSUnlink removes file for the given irods path
func IsUnhandledAttr ¶ added in v0.8.0
IsUnhandledAttr checks if given attr is ignored
Types ¶
type Dir ¶
Dir is a directory node
func NewIRODSRoot ¶ added in v0.9.0
func NewIRODSRoot(fs *IRODSFS, vpathEntry *irodsfs_common_vpath.VPathEntry) (*Dir, error)
NewIRODSRoot returns root directory node for iRODS collection
func NewSubDirInode ¶ added in v0.9.0
func (*Dir) Create ¶
func (dir *Dir) Create(ctx context.Context, name string, flags uint32, mode uint32, out *fuse.EntryOut) (*fusefs.Inode, fusefs.FileHandle, uint32, syscall.Errno)
Create creates a file for the path and returns file handle
func (*Dir) Getxattr ¶ added in v0.8.0
Getxattr returns xattr return the number of bytes. If `dest` is too small, it should return ERANGE and the size of the attribute. If not defined, Getxattr will return ENOATTR.
func (*Dir) Listxattr ¶ added in v0.8.0
Listxattr lists xattr read all attributes (null terminated) into `dest`. If the `dest` buffer is too small, it should return ERANGE and the correct size. If not defined, return an empty list and success.
func (*Dir) Lookup ¶
func (dir *Dir) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fusefs.Inode, syscall.Errno)
Lookup returns a node for the path
func (*Dir) Mkdir ¶
func (dir *Dir) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fusefs.Inode, syscall.Errno)
Mkdir makes a dir for the path
func (*Dir) Removexattr ¶ added in v0.8.0
Removexattr removes xattr If not defined, Removexattr will return ENOATTR.
func (*Dir) Rename ¶
func (dir *Dir) Rename(ctx context.Context, name string, newParent fusefs.InodeEmbedder, newName string, flags uint32) syscall.Errno
Rename renames a node for the path
func (*Dir) Setattr ¶ added in v0.7.1
func (dir *Dir) Setattr(ctx context.Context, fh fusefs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
Setattr sets dir attributes
type File ¶
File is a file node
func NewSubFileInode ¶ added in v0.9.0
func (*File) Getattr ¶ added in v0.7.9
func (file *File) Getattr(ctx context.Context, fh fusefs.FileHandle, out *fuse.AttrOut) syscall.Errno
Getattr returns stat of file entry
func (*File) Getlk ¶ added in v0.8.16
func (file *File) Getlk(ctx context.Context, fh fusefs.FileHandle, owner uint64, lk *fuse.FileLock, flags uint32, out *fuse.FileLock) syscall.Errno
Getlk returns locks
func (*File) Getxattr ¶ added in v0.8.0
Getxattr returns xattr return the number of bytes. If `dest` is too small, it should return ERANGE and the size of the attribute. If not defined, Getxattr will return ENOATTR.
func (*File) Listxattr ¶ added in v0.8.0
Listxattr lists xattr read all attributes (null terminated) into `dest`. If the `dest` buffer is too small, it should return ERANGE and the correct size. If not defined, return an empty list and success.
func (*File) Open ¶
func (file *File) Open(ctx context.Context, flags uint32) (fusefs.FileHandle, uint32, syscall.Errno)
Open opens file for the path and returns file handle
func (*File) Removexattr ¶ added in v0.8.0
Removexattr removes xattr If not defined, Removexattr will return ENOATTR.
func (*File) Setattr ¶
func (file *File) Setattr(ctx context.Context, fh fusefs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
Setattr sets file attributes
func (*File) Setlk ¶ added in v0.8.16
func (file *File) Setlk(ctx context.Context, fh fusefs.FileHandle, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
Setlk obtains a lock on a file, or fail if the lock could not obtained
func (*File) Setlkw ¶ added in v0.8.16
func (file *File) Setlkw(ctx context.Context, fh fusefs.FileHandle, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
Setlkw obtains a lock on a file, waiting if necessary
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
FileHandle is a file handle
func IRODSCreate ¶ added in v0.9.0
func IRODSCreate(ctx context.Context, fs *IRODSFS, dir *Dir, path string, flags uint32, out *fuse.EntryOut) (int64, *FileHandle, syscall.Errno)
IRODSCreate creates file for the given irods path
func IRODSOpen ¶ added in v0.9.0
func IRODSOpen(ctx context.Context, fs *IRODSFS, file *File, path string, flags uint32) (*FileHandle, syscall.Errno)
IRODSOpen opens file for the given irods path
func IRODSOpenLazy ¶ added in v0.9.4
func IRODSOpenLazy(ctx context.Context, fs *IRODSFS, file *File, path string, flags uint32) (*FileHandle, syscall.Errno)
IRODSOpenLazy opens file for the given irods path lazily when it first read or write
func NewFileHandle ¶
func NewFileHandle(fs *IRODSFS, fileHandle irodsfscommon_irods.IRODSFSFileHandle) (*FileHandle, error)
func NewFileHandleLazy ¶ added in v0.9.4
func NewFileHandleLazy(fs *IRODSFS, path string, openMode irodsclient_types.FileOpenMode) (*FileHandle, error)
func (*FileHandle) Flush ¶
func (handle *FileHandle) Flush(ctx context.Context) syscall.Errno
Flush flushes content changes
func (*FileHandle) GetID ¶ added in v0.9.4
func (handle *FileHandle) GetID() string
GetID returns ID
func (*FileHandle) GetLocalLock ¶ added in v0.8.16
func (handle *FileHandle) GetLocalLock(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32, out *fuse.FileLock) syscall.Errno
GetLocalLock returns local lock
func (*FileHandle) GetPath ¶ added in v0.9.4
func (handle *FileHandle) GetPath() string
GetPath returns path
func (*FileHandle) Getlk ¶ added in v0.8.16
func (handle *FileHandle) Getlk(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32, out *fuse.FileLock) syscall.Errno
Getlk returns lock
func (*FileHandle) Read ¶
func (handle *FileHandle) Read(ctx context.Context, dest []byte, offset int64) (fuse.ReadResult, syscall.Errno)
Read reads file content
func (*FileHandle) Release ¶
func (handle *FileHandle) Release(ctx context.Context) syscall.Errno
Release closes file handle
func (*FileHandle) SetFile ¶ added in v0.9.0
func (handle *FileHandle) SetFile(file *File)
SetFile sets File
func (*FileHandle) SetLocalLock ¶ added in v0.8.16
func (handle *FileHandle) SetLocalLock(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
SetLocalLock sets local lock
func (*FileHandle) SetLocalLockW ¶ added in v0.8.16
func (handle *FileHandle) SetLocalLockW(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
SetLocalLockW sets local lock and wait until it acquires the lock
func (*FileHandle) Setattr ¶ added in v0.7.9
func (handle *FileHandle) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
Setattr sets file attributes
func (*FileHandle) Setlk ¶ added in v0.8.16
func (handle *FileHandle) Setlk(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
Setlk locks the file handle
func (*FileHandle) Setlkw ¶ added in v0.8.16
func (handle *FileHandle) Setlkw(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno
Setlkw locks the file handle and wait until it acquires the lock
type FileHandleLocalLock ¶ added in v0.8.16
type FileHandleLocalLock struct { ID string LockType uint32 // syscall.F_RDLCK or syscall.F_WRLCK Pid uint32 Start uint64 End uint64 }
FileHandleLocalLock is a struct for locally managed file lock
type FileHandleLocalLockManager ¶ added in v0.8.16
type FileHandleLocalLockManager struct {
// contains filtered or unexported fields
}
FileHandleLocalLockManager is a manager that manages FileHandleLocalLocks
func NewFileHandleLocalLockManager ¶ added in v0.8.16
func NewFileHandleLocalLockManager() *FileHandleLocalLockManager
NewFileHandleLocalLockManager creates a new FileHandleLocalLockManager
func (*FileHandleLocalLockManager) Get ¶ added in v0.8.16
func (manager *FileHandleLocalLockManager) Get(start uint64, end uint64) *FileHandleLocalLock
Get returns lock
func (*FileHandleLocalLockManager) Lock ¶ added in v0.8.16
func (manager *FileHandleLocalLockManager) Lock(lock *FileHandleLocalLock) error
Lock locks, return error if it errors
func (*FileHandleLocalLockManager) Unlock ¶ added in v0.8.16
func (manager *FileHandleLocalLockManager) Unlock(lock *FileHandleLocalLock) error
Unlock unlocks
type FileHandleMap ¶
type FileHandleMap struct {
// contains filtered or unexported fields
}
func NewFileHandleMap ¶
func NewFileHandleMap() *FileHandleMap
NewFileHandleMap creates a new FileHandleMap
func (*FileHandleMap) Add ¶
func (fileHandleMap *FileHandleMap) Add(handle *FileHandle)
Add registers a file handle
func (*FileHandleMap) Clear ¶
func (fileHandleMap *FileHandleMap) Clear()
Clear clears all file handles registered
func (*FileHandleMap) Get ¶
func (fileHandleMap *FileHandleMap) Get(id string) *FileHandle
Get returns a file handle registered using ID
func (*FileHandleMap) List ¶
func (fileHandleMap *FileHandleMap) List() []*FileHandle
List lists all file handles registered
func (*FileHandleMap) ListByPath ¶
func (fileHandleMap *FileHandleMap) ListByPath(path string) []*FileHandle
ListByPath returns file handles registered using path
func (*FileHandleMap) ListPathsInDir ¶
func (fileHandleMap *FileHandleMap) ListPathsInDir(parentPath string) []string
ListPathsUnderDir returns paths of file handles under given parent path
func (*FileHandleMap) Pop ¶
func (fileHandleMap *FileHandleMap) Pop(id string) *FileHandle
Pop pops a file handle registered using ID and returns the handle
func (*FileHandleMap) PopAll ¶
func (fileHandleMap *FileHandleMap) PopAll() []*FileHandle
PopAll pops all file handles registered (clear) and returns
func (*FileHandleMap) PopByPath ¶
func (fileHandleMap *FileHandleMap) PopByPath(path string) []*FileHandle
PopByPath pops file handles registered using path and returns the handles
func (*FileHandleMap) Remove ¶
func (fileHandleMap *FileHandleMap) Remove(id string)
Remove deletes a file handle registered using ID
func (*FileHandleMap) Rename ¶
func (fileHandleMap *FileHandleMap) Rename(srcPath string, destPath string)
Rename renames files or dirs
func (*FileHandleMap) RenameDir ¶
func (fileHandleMap *FileHandleMap) RenameDir(srcParentPath string, destParentPath string)
RenameDir renames files under parentPath
func (*FileHandleMap) RenameFile ¶ added in v0.9.0
func (fileHandleMap *FileHandleMap) RenameFile(srcPath string, destPath string)
RenameFile renames files
type IRODSFS ¶
type IRODSFS struct {
// contains filtered or unexported fields
}
IRODSFS is a file system object
func NewFileSystem ¶
NewFileSystem creates a new file system
func (*IRODSFS) GetNextOperationID ¶
GetNextOperationID returns next operation ID