handle

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHandle

type FileHandle struct {
	// contains filtered or unexported fields
}

func NewFileHandle

func NewFileHandle(inode *inode.FileInode) (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) (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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL