filesystem

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package filesystem provides utility functions for file system operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(source string, destination string) error

CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist.

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies a single file from src to dst.

func CreateSymlinkOrCopy

func CreateSymlinkOrCopy(source, target string) error

CreateSymlinkOrCopy creates a symlink from target to source, or falls back to copy on failure. Uses relative paths for portability. Works on Linux, macOS, and Windows (with fallback).

func IsSymlink(path string) bool

IsSymlink checks if the given path is a symbolic link

Types

This section is empty.

Jump to

Keyboard shortcuts

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