Documentation ¶
Index ¶
- func CopyDir(source string, destination string) error
- func DeleteDirIfExists(absoluteDirPath string, lowercaseHumanFriendlyName string, ...) error
- func DirExists(absoluteDirPath string, lowercaseHumanFriendlyName string) error
- func DirIsEmpty(absoluteDirPath string, lowercaseHumanFriendlyName string) (bool, error)
- func FileExists(absoluteFilePath string, lowercaseHumanFriendlyName string) error
- func GetAbsolutePath(path string) (string, error)
- func GetAbsolutePathOrDefault(path *string, defaultPath string) (string, error)
- func GetAbsolutePathOrDefaultFunc(path *string, defaultPathFunc func() (string, error)) (string, error)
- func GetUserHomeDir() (string, error)
- func GetWorkingDir() (string, error)
- func ReadBytes(filePath string) ([]byte, error)
- func ReadString(filePath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDirIfExists ¶
func DirIsEmpty ¶
func FileExists ¶
FileExists checks whether a file exists and returns an error if it doesn't.
func GetAbsolutePath ¶
GetAbsolutePath returns the absolute path of the provided path.
func GetAbsolutePathOrDefault ¶
GetAbsolutePathOrDefault returns the absolute path of the provided path if it is not null, otherwise the absolute path of the default path.
func GetAbsolutePathOrDefaultFunc ¶
func GetAbsolutePathOrDefaultFunc(path *string, defaultPathFunc func() (string, error)) (string, error)
GetAbsolutePathOrDefaultFunc returns the absolute path of the provided path if it is not null, otherwise the absolute path of the default path which is supplied by the default path function.
func GetUserHomeDir ¶
GetUserHomeDir returns the path to the home directory of the current user.
func GetWorkingDir ¶
GetWorkingDir returns the current working directory.
func ReadString ¶
ReadString returns the contents of the given file as a string.
Types ¶
This section is empty.