godock: github.com/sqp/godock/libs/files Index | Files | Directories

package files

import "github.com/sqp/godock/libs/files"

Package files provides files operations helpers.


Package Files


func CopyDir Uses

func CopyDir(src, dest string)

CopyDir copies files recursively from source to destination dir.

func CopyFile Uses

func CopyFile(source string, dest string, mode os.FileMode) (err error)

CopyFile copies source file to destination.

func IsExist Uses

func IsExist(path string) bool

IsExist checks whether a file or directory exists. It returns false when the file or directory does not exist.

func Reader Uses

func Reader(filePath string) (r io.Reader, size int64, close func() error, e error)

Reader returns a Reader to the given file, with its size and close call.

func Save Uses

func Save(path string, data []byte, mode os.FileMode) error

Save write a file to disk at given location.

func SetLastModif Uses

func SetLastModif(path ...string) error

SetLastModif save download date file for a package.

func UnTarGz Uses

func UnTarGz(topath string, source io.ReadCloser) error

UnTarGz extracts a tar gz reader to disk at given location.

thanks to github.com/verybluebot/tarinator-go.


fileaccessPackage fileaccess serialize files access.
historyPackage history provides the core part for services history data management.

Package files imports 12 packages (graph) and is imported by 8 packages. Updated 2017-11-30. Refresh now. Tools for package owners.