clerk

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: MIT Imports: 13 Imported by: 2

README

lesiw.io/clerk

Go Reference

// Package clerk provides a utility for updating a directory without
// disturbing the rest of the directory's contents. Create a [ClerkFS] and
// [ClerkFS.Add] one or more [fs.FS] to it, then [ClerkFS.Apply] the combined
// result to a directory.
//
// A [ClerkFS] writes checksums of the files it created to a clerk.sum file in
// the target directory.
//
// If a [ClerkFS] detects that a file has changed since it was last written, it
// will prompt the user before overwriting or deleting it; otherwise, it will
// continue to silently manage the file.

Documentation

Overview

Package clerk provides a utility for updating a directory without disturbing the rest of the directory's contents. Create a ClerkFS and ClerkFS.Add one or more fs.FS to it, then ClerkFS.Apply the combined result to a directory.

A ClerkFS writes checksums of the files it created to a clerk.sum file in the target directory.

If a ClerkFS detects that a file has changed since it was last written, it will prompt the user before overwriting or deleting it; otherwise, it will continue to silently manage the file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClerkFS

type ClerkFS []fs.FS

func (*ClerkFS) Add

func (cfs *ClerkFS) Add(fsys fs.FS) error

func (*ClerkFS) Apply

func (cfs *ClerkFS) Apply(dir string) error

Jump to

Keyboard shortcuts

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