io

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseFilename

func BaseFilename(path string) string

BaseFilename returns the base filename of a path

func EnsurePathExists

func EnsurePathExists(path string) error

EnsurePathExists creates all non-existent parent directories of the given path

func IsDir

func IsDir(path string) bool

IsDir checks if a path is a directory

func PathExists

func PathExists(path string) bool

PathExists checks if a path exists

func ReadJSON

func ReadJSON[T any](path string) ds.Result[T]

ReadJSON reads a JSON object of given type from given path

func ReadJSONList

func ReadJSONList[T any](path string) ds.Result[[]T]

ReadJSONList reads a JSON list of given type from given path

func ReadJSONMap

func ReadJSONMap[V any](path string) ds.Result[map[string]V]

ReadJSONMap reads a JSON map of given value type from given path

func SaveIndentedJSON

func SaveIndentedJSON[T any](item T, path string, tabLength int) error

SaveIndentedJSON saves indented JSON object to given file path

func SaveJSON

func SaveJSON[T any](item T, path string) error

SaveJSON saves JSON object to given file path

Types

This section is empty.

Jump to

Keyboard shortcuts

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