Documentation
¶
Overview ¶
Package fileutils provides utility functions for commonmeta.
Index ¶
- func DownloadFile(url string, progress bool) ([]byte, error)
- func GetExtension(filename string, ext string) (string, string, bool)
- func ReadFile(filename string) ([]byte, error)
- func ReadZIPFile(filename string, name string) ([]byte, error)
- func UnzipContent(input []byte, filename string) ([]byte, error)
- func WriteFile(filename string, output []byte) error
- func WriteZIPFile(filename string, output []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v0.19.3
DownloadFile downloads content from the given URL.
func GetExtension ¶ added in v0.18.0
GetExtension extracts the file extension and checks if the output file should be zipped.
func ReadZIPFile ¶
ReadZIPFile opens a zip archive for reading
func UnzipContent ¶ added in v0.19.3
UnzipContent extracts the content from a zip archive, optionally only extract the content with filename
func WriteZIPFile ¶
WriteZIPFile saves content as a zip file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.