pathutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pathutil provides small helpers for validating and resolving filesystem paths used throughout the project.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist     = errors.New("path does not exist")
	ErrNotDirectory = errors.New("not a directory")
	ErrIsDirectory  = errors.New("is a directory")
	ErrNotRegular   = errors.New("not a regular file")
)

Custom error types

Functions

func ValidateDirectory

func ValidateDirectory(path string) (string, error)

ValidateDirectory ensures the path exists and is a directory.

func ValidateRegularFile

func ValidateRegularFile(path string) (string, error)

ValidateRegularFile ensures the path exists and is a regular file. It resolves symlinks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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