fileops

package
v0.0.0-...-b43479a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package fileops contains the narrowly scoped local mutations Eta permits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Root

type Root struct {
	// contains filtered or unexported fields
}

func New

func New(root string) (Root, error)

func (Root) Copy

func (r Root) Copy(from Root, sourceRelative, destinationRelative string) error

Delete removes a local file, symlink, or directory tree within its root. Copy copies a contained regular file or complete directory tree into this root. Directory copies are assembled in a sibling staging directory and atomically promoted only after every entry has been copied.

func (Root) CopyRegular

func (r Root) CopyRegular(from Root, sourceRelative, destinationRelative string) error

CopyRegular copies one contained regular file into this root. It refuses overwrite, directories, and symlink destinations; callers can therefore use it for ordinary Explorer copy/paste without special destination semantics.

func (Root) Delete

func (r Root) Delete(relative string) error

func (Root) EnsureDirectory

func (r Root) EnsureDirectory(relative string) error

EnsureDirectory creates one contained directory after its parent has been resolved, refusing symlinks and existing non-directory targets.

func (Root) Rename

func (r Root) Rename(from, to string) error

Rename moves a local entry within its configured root. Existing targets are rejected rather than overwritten.

Jump to

Keyboard shortcuts

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