Help us shape the future of Go! Take the 2026 Go Developer Survey

fsutil

package
v0.0.0-...-a92561a Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fsutil provides small shared filesystem helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists reports whether path exists on disk (following symlinks). It returns false for any stat error, including permission errors.

func ReadPinnedFile

func ReadPinnedFile(path string) ([]byte, error)

ReadPinnedFile reads a file through a directory handle pinned to its canonical parent. This closes the symlink/rename race between path validation and the read operation.

func WritePinnedFile

func WritePinnedFile(path string, data []byte, perm os.FileMode) error

WritePinnedFile writes a file through a directory handle pinned to its canonical parent. The parent must already exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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