Documentation ¶
Overview ¶
Package opfs is an fs implementation that supports stat, reads, and globbing.
Index ¶
- Variables
- func NewPlanDirFS(dir string) fsPlanDir
- type FS
- func (fs FS) Abs(name string) string
- func (fs FS) Glob(pattern string) ([]string, error)
- func (fs FS) Join(paths ...string) string
- func (fs FS) Open(name string) (fs.File, error)
- func (fs FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (fs FS) ReadFile(name string) ([]byte, error)
- func (fs FS) Stat(name string) (fs.FileInfo, error)
- type PlanDir
- type StateFileEntry
- type StateFileInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("plandir: not found")
Functions ¶
func NewPlanDirFS ¶
func NewPlanDirFS(dir string) fsPlanDir
Types ¶
type StateFileEntry ¶
func (*StateFileEntry) ChecksumOnly ¶
func (f *StateFileEntry) ChecksumOnly() *StateFileEntry
func (StateFileEntry) MarshalJSON ¶
func (f StateFileEntry) MarshalJSON() ([]byte, error)
func (*StateFileEntry) UnmarshalJSON ¶
func (f *StateFileEntry) UnmarshalJSON(b []byte) error
func (*StateFileEntry) WithoutTimestamps ¶
func (f *StateFileEntry) WithoutTimestamps() *StateFileEntry
type StateFileInfo ¶
type StateFileInfo struct { RawName string `json:"name"` RawModTime time.Time `json:"mtime,omitempty"` RawMode fs.FileMode `json:"mode,omitempty"` RawSize int64 `json:"size,omitempty"` SHA256 []byte `json:"checksum,omitempty"` Contents []byte `json:"contents,omitempty"` }
func (StateFileInfo) IsDir ¶
func (sfi StateFileInfo) IsDir() bool
func (StateFileInfo) ModTime ¶
func (sfi StateFileInfo) ModTime() time.Time
func (StateFileInfo) Mode ¶
func (sfi StateFileInfo) Mode() fs.FileMode
func (StateFileInfo) Name ¶
func (sfi StateFileInfo) Name() string
func (StateFileInfo) Size ¶
func (sfi StateFileInfo) Size() int64
func (StateFileInfo) Sys ¶
func (sfi StateFileInfo) Sys() interface{}
Click to show internal directories.
Click to hide internal directories.