Documentation ¶
Index ¶
- Variables
- func BasePath(path string) string
- func CleanPath(filePath string) string
- func CopyFileToDirectory(pathSourceFile string, pathDestFile string) bool
- func ExitGracefully(callOnExit func())
- func FileExists(filePath string) bool
- func GetFileContent(filePath string) ([]byte, error)
- func Win32MessageBox(hWindow uintptr, caption, title string, flags uintptr) int
- type File
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserPath = os.Getenv("USERPROFILE") DataPath = ".\\data\\" AssetsPath = ".\\assets\\" )
Common local system paths (for data storage purposes).
Functions ¶
func BasePath ¶
`BasePath` derives the file base from the path and removes any whitespace from it.
"C:/Path/example file.exe" -> "examplefile.exe".
func CopyFileToDirectory ¶
func ExitGracefully ¶
func ExitGracefully(callOnExit func())
`ExitGracefully` will execute the supplied function before exiting the program.
func FileExists ¶
func GetFileContent ¶
`GetFileContent` reads the passed filepaths content and returns it as an array of bytes.
Types ¶
type File ¶
`File` represents the attributes of a file on the host machine.
func (*File) WriteString ¶
Click to show internal directories.
Click to hide internal directories.