osfs

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 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 File

type File struct {
	*os.File
	// contains filtered or unexported fields
}

File implements vfs.File for the current target operating system.

func Open

func Open(path string, mode os.FileMode) (*File, error)

func (*File) Lock

func (f *File) Lock(exclusive, blocking bool) error

func (*File) MMap

func (f *File) MMap(sz int) ([]byte, error)

func (*File) MUnmap

func (f *File) MUnmap(b []byte) error

func (*File) Size

func (f *File) Size() (int64, error)

func (*File) Stat

func (f *File) Stat() (os.FileInfo, error)

func (*File) Sync

func (f *File) Sync(flags vfs.SyncFlag) error

Sync uses fsync or fdatasync (if vfs.SyncDataOnly flag is set).

Handling write-back errors is at a mess in older linux kernels 1. With mixed read-write operations, there is a chance that write-back errors are never reported to user-space applications, as error flags are cleared in the caches. Error handling was somewhat improved in 4.13 23, such that errors will actually be reported on fsync (more improvements have been added to 4.16).

func (*File) Truncate

func (f *File) Truncate(sz int64) error

func (*File) Unlock

func (f *File) Unlock() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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