fsutil

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fsutil defiens a set of internal utility functions used to interact with the file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureMaxPermissions

func EnsureMaxPermissions(fi os.FileInfo, maxPerms os.FileMode) error

EnsureMaxPermissions tests the provided file info, returning an error if the file's permission bits contain excess permissions not set in maxPerms.

For example, a file with permissions -rw------- will successfully validate with maxPerms -rw-r--r-- or -rw-rw-r--, but will not validate with maxPerms -r-------- (due to excess --w------- permission) or --w------- (due to excess -r-------- permission).

Only permission bits of the file modes are considered.

func IsMetaFile

func IsMetaFile(e os.DirEntry) (bool, error)

IsMetaFile tests wheter a DirEntry appears to be a metadata file or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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