fo

package
v0.0.0-...-ffea4ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirectoryIfNotExist

func CreateDirectoryIfNotExist(dir string) error

CreateDirectoryIfNotExist creates a directory or path of directories if it doesn't exist

func DownloadFile

func DownloadFile(destDir, url string) (string, error)

DownloadFile downloads a file from the provided url and will save it under the provided name in the destination directory

func SplitPathAndFile

func SplitPathAndFile(p string) (string, string, error)

SplitPathAndFile takes a full path (windows and unix) or an URL splits the path and file The last element is considered to be the file and is returned as such When an URL is provided the prodocol indicator will be removed and the domain name will become a part of the path So http://example.com/files/file.zip will return example.com/files as the path

func Unzip

func Unzip(destDir, archive string) error

Unzip extracts the files of a .zip archive to the provided destination directory

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL