internal: github.com/cznic/internal/file Index | Files

package file

import "github.com/cznic/internal/file"

Package file provides an os.File-like interface of a memory mapped file.

Index

Package Files

file.go

type Interface Uses

type Interface interface {
    io.ReaderAt
    io.ReaderFrom
    io.WriterAt
    io.WriterTo

    Close() error
    Stat() (os.FileInfo, error)
    Sync() error
    Truncate(int64) error
}

Interface is a os.File-like entity.

func Open Uses

func Open(f *os.File) (Interface, error)

Open returns a new Interface backed by f, or an error, if any.

func OpenMem Uses

func OpenMem(name string) (Interface, error)

OpenMem returns a new Interface, or an error, if any. The Interface content is volatile, it's backed only by process' memory.

Package file imports 8 packages (graph) and is imported by 2 packages. Updated 2017-09-12. Refresh now. Tools for package owners.