Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirHandle ¶
DirHandle is the state required for reading from directories.
func NewDirHandle ¶
NewDirHandle creates a directory handle that obtains listings from the supplied inode.
func (*DirHandle) ReadDir ¶
func (dh *DirHandle) ReadDir( ctx context.Context, op *fuseops.ReadDirOp, localFileEntries []fuseutil.Dirent) (err error)
ReadDir handles a request to read from the directory, without responding.
Special case: we assume that a zero offset indicates that rewinddir has been called (since fuse gives us no way to intercept and know for sure), and start the listing process over again.
LOCKS_REQUIRED(dh.Mu) LOCKS_EXCLUDED(du.in)
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func NewFileHandle ¶
func NewFileHandle(inode *inode.FileInode, fileCacheHandler *file.CacheHandler, cacheFileForRangeRead bool) (fh *FileHandle)
func (*FileHandle) Destroy ¶
func (fh *FileHandle) Destroy()
Destroy any resources associated with the handle, which must not be used again.
func (*FileHandle) Inode ¶
func (fh *FileHandle) Inode() *inode.FileInode
Inode returns the inode backing this handle.
func (*FileHandle) Lock ¶
func (fh *FileHandle) Lock()
func (*FileHandle) Read ¶
func (fh *FileHandle) Read(ctx context.Context, dst []byte, offset int64, sequentialReadSizeMb int32) (n int, err error)
Equivalent to locking fh.Inode() and calling fh.Inode().Read, but may be more efficient.
LOCKS_REQUIRED(fh) LOCKS_EXCLUDED(fh.inode)
func (*FileHandle) Unlock ¶
func (fh *FileHandle) Unlock()