files

package
v0.0.13-beta Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package files provides utilities for managing collections of files. It builds on top of the file package to provide operations that work on multiple files simultaneously. The Files type offers a convenient way to perform batch operations on groups of related files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Files

type Files []file.File

Files represents a collection of filesystem paths. Provides batch operations for working with multiple files.

func New

func New(dir string, paths ...string) (fs Files)

New creates a Files collection from path strings. Joins each path with the provided directory to create full paths. Empty paths are skipped, and an empty directory uses paths as-is.

func (Files) SymlinksFor

func (es Files) SymlinksFor(file file.File) error

SymlinksFor creates symlinks from each file to a target. Creates a symbolic link at each path in the collection, pointing to the specified target file. Returns an error if any symlink creation fails.

Jump to

Keyboard shortcuts

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