Documentation ¶
Overview ¶
Package txtar provides a simple write-only filesystem based on the txtar archive format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem struct { // Output is the destination of the filesystem // when the Flush method is called. If Output // is nil, data is written to os.Stdout. Output io.Writer // contains filtered or unexported fields }
FileSystem is a write-only filesystem based on the txtar text archive format provided by golang.org/x/tools/txtar.
func (*FileSystem) Flush ¶
func (fs *FileSystem) Flush() error
Flush writes all closed io.Writers to the FileSystem's Output or os.Stdout if Output is nil. The files in the txtar are sorted lexically by name.
func (*FileSystem) Open ¶
func (fs *FileSystem) Open(path string) (io.WriteCloser, error)
Open returns a new io.WriteCloser file whose writes will added to the txtar output of the Filesystem with the given path. Writes to the file are buffered until the Flush method is called. The file must be closed before calling Flush.
Click to show internal directories.
Click to hide internal directories.