fsnap

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2021 License: GPL-3.0 Imports: 0 Imported by: 0

README

FSNAP – File System Snapshots

Go code (golang) packages that offer concise reading and writing of snapshots of file contents or directory contents.

Packages

The following packages are included:

File Snapshots: fsnap/filesnap

Read or write a list of file contents.

Example
myFiles := filesnap.Files{
	"emptyFile":     []byte(""),
	"intro.txt":     []byte("hello world!"),
	"some/sub/file": []byte("foobar"),
}
myFiles.Write("/target/dir")
Documentation
Directory Snapshot: fsnap/dirsnap

Read or write a nested tree of directory entries.

Example
type fsd = dirsnap.Dirs

wantEntries := fsd{
	"emptyFile": nil,
	"intro.txt": nil,
	"some":      fsd{"sub": fsd{"file": nil}},
}

gotEntries, err := dirsnap.Read("/target/dir", 5)
require.NoError(t, err)

assert.Equal(t, wantEntries, gotEntries)
Documentation

Documentation

Overview

Package fsnap provides utilities to read and write "snapshots" of file and directory contents.

Directories

Path Synopsis
Package dirsnap simplifies reading and writing snapshots of directories and their contents.
Package dirsnap simplifies reading and writing snapshots of directories and their contents.
Package filesnap simplifies reading and writing snapshots of files and their contents.
Package filesnap simplifies reading and writing snapshots of files and their contents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL