clifs

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package to encapsulate CLI filesystem operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileExists added in v0.3.2

func CheckFileExists(path string) (bool, error)

func CreateFile

func CreateFile(path string, content string, mode fs.FileMode) error

func GetApiKey

func GetApiKey(key string) (*apikey.ApiKey, error)

func GetFileContent

func GetFileContent(path string) (string, error)

func GetKeyDirPath

func GetKeyDirPath(userSpecifiedPath string) (string, error)

Given a user-specified directory, return the path. The logic is in the case where users do not specify a folder. If the folder isn't specified, we default to $XDG_CONFIG_HOME/.config/turnkey/keys. If this env var isn't set, we default to $HOME/.config/turnkey/keys If $HOME isn't set, this function returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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