Documentation
¶
Overview ¶
Package txtarfs turns a txtar into an fs.FS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
As returns an io/fs.FS containing ar's contents. Subsequent changes to ar may or may not be reflected in the returned fs.FS.
func From ¶
From constructs a txtar.Archive with the contents of fsys and an empty Comment. Subsequent changes to fsys are not reflected in the returned archive.
The transformation is lossy. For example, because directories are implicit in txtar archives, empty directories in fsys will be lost. And txtar does not represent file mode, mtime, or other file metadata.
Note also this warning from function txtar.Format:
It is assumed that the Archive data structure is well-formed: a.Comment and all a.File[i].Data contain no file marker lines, and all a.File[i].Name is non-empty.
From does not guarantee that a.File[i].Data contain no file marker lines.
In short, it is unwise to use From/As as a generic filesystem serialization mechanism.
Types ¶
This section is empty.