Documentation ¶
Index ¶
- type File
- func (f *File) Lock(exclusive, blocking bool) error
- func (f *File) MMap(sz int) ([]byte, error)
- func (f *File) MUnmap(b []byte) error
- func (f *File) Size() (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync(flags vfs.SyncFlag) error
- func (f *File) Truncate(sz int64) error
- func (f *File) Unlock() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File implements vfs.File for the current target operating system.
func (*File) Sync ¶
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).
Source Files ¶
Click to show internal directories.
Click to hide internal directories.