Documentation
¶
Index ¶
- Constants
- func KeepAbs(path string, rel func(string) string) string
- func MustDir(perm fs.FileMode, forfile string) (file string)
- func ProvideDir(perm fs.FileMode, forfile string) (file string, err error)
- type App
- func (a App) Bin(rel ...string) string
- func (a App) BinPath(rel string) string
- func (a App) CheckDirs(flags AppPath) (res AppPath, err error)
- func (a App) Doc(rel ...string) string
- func (a App) DocPath(rel string) string
- func (a App) Lib(rel ...string) string
- func (a App) LibPath(rel string) string
- func (a App) LocalData(rel ...string) string
- func (a App) LocalDataPath(rel string) string
- func (a App) ProvideDirs(perm fs.FileMode, flags AppPath) error
- func (a App) RoamingData(rel ...string) string
- func (a App) RoamingDataPath(rel string) string
- type AppPath
- type AppPaths
- type DesktopUserApp
- type DirTree
- type SingleDir
Examples ¶
Constants ¶
View Source
const AllPaths = InstallPaths | DataPaths
View Source
const DataPaths = LocalDataPath | RoamingDataPath
View Source
const InstallPaths = BinPath | LibPath | DocPath
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶ added in v0.6.1
type App struct {
// contains filtered or unexported fields
}
func (App) LocalDataPath ¶ added in v0.6.1
func (App) ProvideDirs ¶ added in v0.6.2
func (App) RoamingData ¶ added in v0.6.1
func (App) RoamingDataPath ¶ added in v0.6.1
type DesktopUserApp ¶ added in v0.6.1
type DesktopUserApp string
func NewDesktopUserApp ¶ added in v0.6.1
func NewDesktopUserApp(username string) DesktopUserApp
func (DesktopUserApp) Bin ¶ added in v0.6.1
func (u DesktopUserApp) Bin(app ...string) string
func (DesktopUserApp) Doc ¶ added in v0.6.1
func (u DesktopUserApp) Doc(app ...string) string
func (DesktopUserApp) Lib ¶ added in v0.6.1
func (u DesktopUserApp) Lib(app ...string) string
func (DesktopUserApp) LocalData ¶ added in v0.6.1
func (u DesktopUserApp) LocalData(app ...string) string
func (DesktopUserApp) RoamingData ¶ added in v0.6.1
func (u DesktopUserApp) RoamingData(app ...string) string
type DirTree ¶ added in v0.6.2
type DirTree struct { RelBin string RelLib string RelDoc string RelLocalData string RelRoamingData string // contains filtered or unexported fields }
Example ¶
Output: basedir/executable basedir/lib/sample.so basedir/doc/README.md basedir/data/local.data basedir/roaming/roaming.data
func ExeDirTree ¶ added in v0.6.2
func NewDirTree ¶ added in v0.6.2
func (*DirTree) RoamingData ¶ added in v0.6.2
Click to show internal directories.
Click to hide internal directories.