Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToZip ¶
AddToZip writes the given data to a zip archive using the passed writer. Folders are added to the zip recursively. The folder structure is fully preserved.
func DownloadFile ¶
DownloadFile will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.
func DownloadFileOrAccessCache ¶
DownloadFileOrAccessCache checks whether the file already exists on the users filesystem and only downloads it if it doesn't.
func EnsureDirectoryExists ¶
EnsureDirectoryExists creates a directy if doesn't already exist. If an error occurs during the existence check, that error is returned directly.
func ToAbsolutePath ¶
ToAbsolutePath handles different kind of paths and makes an absolute path out of them. Consider the following three inputs:
file:///home/marcel/test.txt%C3%A4 ./test.txtä ~/test.txtä
Those will be turned into (assuming that our current working directory is /home/marcel:
/home/marcel/test.txtä
However, this method doesn't check for file existence.
Types ¶
This section is empty.