directory

package
v0.0.0-...-bfc391e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAllDirectories

func CreateAllDirectories(path string) error

createDir creates all the directories of a given path if they don't exist.

func CreateSingleDirectory

func CreateSingleDirectory(basePath, dirName, duplicateDirectoryNameFormat string) (string, error)

CreateDirectory creates a directory and handles duplicates by appending a suffix.

func GetApplicationDirectories

func GetApplicationDirectories() (dataDir string, configDir string, cacheDir string, funcErr error)

GetApplicationDirectories returns the application directories.

func GetCacheDirectory

func GetCacheDirectory() (string, error)

GetCacheDirectory retrieves the cache directory.

func GetConfigDirectory

func GetConfigDirectory() (string, error)

GetConfigDirectory retrieves the first available config directory.

func GetDataDirectory

func GetDataDirectory() (string, error)

GetDataDirectory retrieves the first available data directory.

func GetSubdirectoryPaths

func GetSubdirectoryPaths(path string) ([]string, error)

Give a directory path and this will return a slice of directory names at that path.

Types

type GetApplicationDirectoriesFunc

type GetApplicationDirectoriesFunc func() (dataDir string, configDir string, cacheDir string, funcErr error)

GetApplicationDirectoriesFunc is a type of function that returns the application directories.

Jump to

Keyboard shortcuts

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