gocuelang.org/go/internal/txtarfs Index | Files

package txtarfs

import "cuelang.org/go/internal/txtarfs"

Index

Functions

func FS

func FS(ar *txtar.Archive) fs.FS

TxtarFS returns an fs.FS which reads from a txtar.Archive.

func From

func From(fsys fs.FS) (*txtar.Archive, error)

From constructs an 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. From does not guarantee that a.File[i].Data contains no file marker lines. See also warnings on Format. In short, it is unwise to use txtar as a generic filesystem serialization mechanism.

Source Files

txtar_fs.go

Version
v0.9.2
Published
Jun 26, 2024
Platform
darwin/amd64
Imports
8 packages
Last checked
35 minutes ago

Tools for package owners.