fsutil

package
v1.42.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package fsutil provides shared filesystem safety helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSymlink(fs afero.Fs, path string) bool

IsSymlink returns true if path is a symbolic link. Returns false if the path does not exist, cannot be lstat'd, or the filesystem does not support symlink-aware lstat operations.

func RefuseWriteThroughSymlink(fs afero.Fs, path, stopPath, name string) error

RefuseWriteThroughSymlink rejects writes when the destination path or any existing parent directory between path and stopPath is a symlink.

func RefuseWriteThroughSymlinkOS

func RefuseWriteThroughSymlinkOS(path, stopPath, name string) error

RefuseWriteThroughSymlinkOS rejects writes when the destination path or any existing parent directory between path and stopPath is a symlink on the OS filesystem.

Types

This section is empty.

Jump to

Keyboard shortcuts

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