Documentation ¶
Overview ¶
Package fpath implements cross-platform file and object path handling.
Index ¶
- func ApplicationDir(subdir ...string) string
- func AtomicWriteFile(outfile string, data []byte, _ os.FileMode) (err error)
- func EditFile(fileToEdit string) error
- func GetTempData(ctx context.Context) (string, bool, bool)
- func IsRoot(path string) bool
- func IsValidSetupDir(name string) (ok bool, err error)
- func IsWritable(filepath string) (bool, error)
- func WithTempData(ctx context.Context, directory string, inmemory bool) context.Context
- type FPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationDir ¶
ApplicationDir returns best base directory for specific OS.
func AtomicWriteFile ¶
AtomicWriteFile is a helper to atomically write the data to the outfile.
func GetTempData ¶
GetTempData returns if temporary data should be stored in memory or on disk.
func IsValidSetupDir ¶
IsValidSetupDir checks if directory is valid for setup configuration.
func IsWritable ¶
IsWritable determines if a directory is writeable.
Types ¶
Click to show internal directories.
Click to hide internal directories.