fs

package
v0.0.0-...-6fb83e4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

File ...

func TempFile

func TempFile(fsm *Filesystem, pattern string, flags int) (*File, error)

func (*File) Close

func (f *File) Close() error

Close ...

func (*File) Datasync

func (f *File) Datasync() error

Datasync ...

func (*File) Fd

func (f *File) Fd() uintptr

Fd ...

func (*File) Name

func (f *File) Name() string

Name ...

func (*File) ReadAt

func (f *File) ReadAt(buf []byte, off int64) (int, error)

ReadAt ...

func (*File) ReadAtFixed

func (f *File) ReadAtFixed(b *fixed.Buffer, off int64) (int, error)

ReadAtFixed ...

func (*File) Sync

func (f *File) Sync() error

Sync ...

func (*File) WriteAt

func (f *File) WriteAt(buf []byte, off int64) (int, error)

WriteAt ...

func (*File) WriteAtFixed

func (f *File) WriteAtFixed(b *fixed.Buffer, off int64) (int, error)

WriteAtFixed ... FIXME(dshulyak) write after canceled write will hang see https://github.com/axboe/liburing/issues/179

type FileRegistry

type FileRegistry interface {
	RegisterFiles([]int32) error
	UnregisterFiles() error
	UpdateFiles([]int32, uint32) error
}

FileRegistry ...

type Filesystem

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

Filesystem is a facade for all fs-related functionality.

func NewFilesystem

func NewFilesystem(lp *loop.Loop, opts ...FilesystemOption) *Filesystem

NewFilesystem returns facade for interacting with uring-based filesystem functionality.

func (*Filesystem) Open

func (fsm *Filesystem) Open(name string, flags int, mode os.FileMode) (*File, error)

Open a file.

type FilesystemOption

type FilesystemOption func(*Filesystem)

FilesystemOption ...

func RegisterFiles

func RegisterFiles(n int) FilesystemOption

RegisterFiles enables file registration in uring when file is opened. n is a hint to for fds slice allocation. When fds slice needs to grow registration module will have to perform two unixs (unregister files, register files).

type Write

type Write struct {
	Buf    []byte
	Offset uint64
}

Write ...

Jump to

Keyboard shortcuts

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