fsutil

package module
v0.0.0-...-ae02e05 Latest Latest
Warning

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

Go to latest
Published: May 18, 2016 License: MIT Imports: 7 Imported by: 1

README

fsutil

File system utility functions

Install

go get -u github.com/forestgiant/fsutil

Docs

https://godoc.org/github.com/forestgiant/fsutil

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfCompressed

func CheckIfCompressed(file io.ReadSeeker) bool

CheckIfCompressed asserts whether the designated file is compressed

func CopyDirectory

func CopyDirectory(source string, destination string, recursive bool) error

CopyDirectory copies the directory at the source path to the provided destination, with the option of recursively copying subdirectories.

func CopyFile

func CopyFile(source, destination string) error

CopyFile copies the file at the source path to the provided destination.

func FileExists

func FileExists(path string) bool

FileExists asserts whether provided path results in a valid file on the system

func IsEmpty

func IsEmpty(path string) (bool, error)

IsEmpty test if a directory is empty

func RemoveDirContent

func RemoveDirContent(path string) error

RemoveDirContent removes all the files in a directory but keeps the directory

func Unzip

func Unzip(src, dest string) (outErr error)

Unzip extracts the contents at the designated src path and writes them to the destination path outErr out param is set by defer function

Types

This section is empty.

Jump to

Keyboard shortcuts

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