gwtypes

package
v0.0.0-...-2a1367a Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessMode

type AccessMode int

Access Mode for file i/o

const (
	Input  AccessMode = iota // Sequential input mode
	Output                   // Sequential output mode
	Append                   // Position to end of file for writing
	Random                   // Random input/output mode
)

func (AccessMode) String

func (am AccessMode) String() string

type AnOpenFile

type AnOpenFile interface {
	AccessMode() AccessMode // the access mode for this open file
	FQFN() string           // the fully qualified (drive:path/filename.ext) for the file
	LockMode() LockMode     // the lock mode for this open file
}

AnOpenFile holds the data for an open file that lives in the in-memory implementation of data files

type LockMode

type LockMode int

Lock Mode for file i/o

const (
	Shared        LockMode = iota // deny none, allows other process all access except default
	LockRead                      // deny read to other processes, fails if already open in default or read access
	LockWrite                     // deny write to other processes, fails if already open in default or write access
	LockReadWrite                 // deny all, fails if already open in any mode
	Default                       // deny all, no other process can access the file, fails if already open
)

func (LockMode) String

func (lm LockMode) String() string

Jump to

Keyboard shortcuts

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