Categorymodernc.org/fileutil
modulepackage
1.3.0
Repository: https://gitlab.com/cznic/fileutil
Documentation: pkg.go.dev

# README

This is a goinstall-able mirror of modified code already published at: http://git.nic.cz/redmine/projects/gofileutil/repository

Packages in this repository:

Install: $go get modernc.org/fileutil Godocs: http://godoc.org/modernc.org/fileutil

Install: $go get modernc.org/fileutil/storage Godocs: http://godoc.org/modernc.org/fileutil/storage

Install: $go get modernc.org/fileutil/falloc Godocs: http://godoc.org/modernc.org/fileutil/falloc

Install: $go get modernc.org/fileutil/hdb Godocs: http://godoc.org/modernc.org/fileutil/hdb

# Packages

Package ccgo collects utilities often used while generating code with ccgo.
WIP: Package falloc provides allocation/deallocation of space within a file/store (WIP, unstable API).
WIP: Package hdb provides a "handle"/value DB like store, but actually it's closer to the model of a process's virtual memory and its alloc, free and move methods.
WIP: Package storage defines and implements storage providers and store accessors.

# Functions

CopyDir recursively copies src in fsys to dest in the OS file system, preserving permissions and times where/when possible.
CopyFile copies src in fsys, to dest in the OS file system, preserving permissions and times where/when possible.
Fadvise predeclares an access pattern for file data.
IsEOF reports whether err is an EOF condition.
NewGoMFile return a newly created GoMFile.
NewMFile returns a newly created MFile or Error if any.
PunchHole deallocates space inside a file in the byte range starting at offset and continuing for len bytes.
Read reads buf from r.
TempFile creates a new temporary file in the directory dir with a name ending with suffix, basename starting with prefix, opens the file for reading and writing, and returns the resulting *os.File.

# Constants

Don't need these pages.
Data will be accessed once.
No further special treatment.
Expect random page references.
Expect sequential page references.
Will need these pages.

# Structs

GoMFile is a concurrent access safe version of MFile.
MFile represents an os.File with a guard/handler on change/modification.

# Type aliases

FadviseAdvice is used by Fadvise.
MFileHandler resolves modifications of File.