utils

package
v0.0.0-...-c136182 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

package utils provides various utility functions for the application.

Index

Constants

This section is empty.

Variables

View Source
var ErrDocFolderNotFound = errors.New("no documents folder found")

Functions

func GetCacheDir

func GetCacheDir(appDir string) (string, error)

GetCacheDir returns the user's (OS-specific) caching folder. If the folder is not found, an error is returned. If appDir is not empty, it is appended to the cacheDir and if the resulting folder does not exist, it is created.

func GetConfigDir

func GetConfigDir(appDir string) (string, error)

GetConfigDir returns the user's (OS-specific) configuration folder. If the folder is not found, an error is returned. If appDir is not empty, it is appended to the configDir and if the resulting folder does not exist, it is created.

func GetDocumentsDir

func GetDocumentsDir() (string, error)

GetCacheDir returns the user's documents folder. The documents folder is the user's (OS-specific) home folder with the word "Documents" appended to it. If the home folder or the $HOME/Documents folder is not found, an error is returned.

func Listing

func Listing(folderPath string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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