fsutil

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fsutil provides small, UI-free filesystem path helpers shared by CLIs: home-directory expansion and directory-existence checks.

It has no dependencies beyond the standard library, so any consumer (a terminal UI, a plain CLI, a daemon) can import it without pulling in a UI toolkit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) (bool, error)

DirExists reports whether path exists and is a directory. A missing path is (false, nil); any other stat failure is returned as the error.

func ExpandHome

func ExpandHome(p string) string

ExpandHome expands a leading "~" or "~/" in p to the user's home directory. Any other path, or a failure to determine the home directory, returns p unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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