package filesystem
Functions
CopyDirectory
CopyDirectory copies the directory at the source path to the destination path.
CopyFile
CopyFile copies the file from the source path to the destination path. If the destination file already exists, an error will be returned.
CopyGoSourceFile
CopyGoSourceFile copies go specific source code from the source path to the destination path. If the destination file already exists, an error will be returned. This function is used to ensure that the generated files have the correct header.
CreateDirectory
CreateDirectory creates a directory at the specified path with full permissions.
DeleteDirectory
DeleteDirectory deletes the directory at the specified path.
DirectoryExists
DirectoryExists returns true if the directory exists at the specified path.
FileExists
FileExists returns true if the file exists at the specified path.
ImageDirectory
ImageDirectory will attempt to find the default user directory where images are stored. This function is OS specific.
ListFilesRecursive
ListFilesRecursive returns a list of all files in the specified, it walks through all of the subdirectories as well.
ListFoldersRecursive
ListFoldersRecursive returns a list of all directories in the specified, it walks through all of the subdirectories as well.
ListRecursive
ListRecursive returns a list of all files and directories in the specified, it walks through all of the subdirectories as well.
ReadFile
ReadFile reads the binary data from the file at the specified path. If the file does not exist, an error will be returned.
ReadTextFile
ReadTextFile reads the text data from the file at the specified path. If the file does not exist, an error will be returned.
WriteFile
WriteFile writes the binary data to the file at the specified path. This will use permissions 0644 for the file. If the file already exists, it will be overwritten.
WriteTextFile
WriteTextFile writes the text data to the file at the specified path. This will use permissions 0644 for the file. If the file already exists, it will be overwritten.