Documentation
¶
Index ¶
- Constants
- func BuildFilename(location Location, name string) (string, error)
- func GetAppSettingsDirectory() (string, error)
- func GetHomeDirectory() (string, error)
- func GetSystemSettingsDirectory() (string, error)
- func Open(location Location, name string, flag int, perm os.FileMode) (*os.File, error)
- func SetAppName(name string)
- type Location
Constants ¶
View Source
const ( Home Location = 1 AppSettings = 2 SystemSettings = 3 )
Variables ¶
This section is empty.
Functions ¶
func BuildFilename ¶ added in v1.0.1
BuildFilename returns the complete file name using the desired location as a base.
func GetAppSettingsDirectory ¶
GetAppSettingsDirectory gets the directory to save local app settings. Should be used for non system-wide applications.
func GetHomeDirectory ¶
GetHomeDirectory gets the user's home directory
func GetSystemSettingsDirectory ¶
GetSystemSettingsDirectory gets the directory to save app settings. Should be used for system-wide applications.
func Open ¶ added in v1.0.1
Open is a shortcut to open and/or create a file under the desired location.
func SetAppName ¶ added in v1.0.1
func SetAppName(name string)
SetAppName sets the name of the current application. GetAppSettingsDirectory and GetSystemSettingsDirectory appends the application name automatically to the returned string.
Types ¶
Click to show internal directories.
Click to hide internal directories.