Documentation ¶
Overview ¶
Package dockerfs defines a FS interface for accessing files in a Docker container.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File represents a file in a Docker container.
type FileInfo ¶
type FileInfo struct { LinkTarget string // contains filtered or unexported fields }
FileInfo implements fs.FileInfo.
func NewFileInfo ¶
func NewFileInfo(name string, size int64, mode fs.FileMode, modTime time.Time, linkTarget string) FileInfo
NewFileInfo builds a new FileInfo.
type Filesystem ¶
type Filesystem struct { Client httpx.BasicClient Container string }
Filesystem exposes files in a Docker container via a FS-compatible API. NOTE: Client accesses will not use Scheme or Host URI elements.
func (Filesystem) Open ¶
func (c Filesystem) Open(path string) (*File, error)
Open returns a File from a Docker container.
func (Filesystem) OpenAndResolve ¶
func (c Filesystem) OpenAndResolve(path string) (*File, error)
OpenAndResolve returns the file from the given container, resolving any symlinks encountered.
func (Filesystem) Resolve ¶
func (c Filesystem) Resolve(f *File) (*File, error)
Resolve attempts to resolve the symlink of the provided file.
func (Filesystem) Stat ¶
func (c Filesystem) Stat(path string) (*FileInfo, error)
Stat returns the FileInfo of a file from a Docker container.
func (Filesystem) WriteFile ¶
func (c Filesystem) WriteFile(f *File) error
WriteFile writes the contents of the file back to the Docker container.