files

package module
v0.0.0-...-2246e61 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2018 License: MIT Imports: 12 Imported by: 2

README

go-files

Collection of functions to help with operation with and on files.

Usage

Copy a file:

err := files.Copy("/path/to/src", "/path/to/dir")

Hash a file:

hash, err := files.HashFile("/path/to/file", "sha512")

Hash a string:

hash, err := files.HashString("test123", "md5")

On Windows, expand paths:

path := files.ExpandWindows("%ProgramFiles%\\Application\\file.exe")

License

Released under MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) error

func HashFile

func HashFile(target string, algorithm string) (string, error)

func HashString

func HashString(target string, algorithm string) (string, error)

func Zip

func Zip(source, destination string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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