ioex

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 5 Imported by: 0

README

ioex

Custom supplements to io.

License

MIT

See included LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyAll

func CopyAll(destination, source string, overwrite bool) error

CopyAll copies a source file or a directory to destination and does it recursively. Directories along the destination path(s) are created as needed. Files are copied using io.Copy.

If overwrite is specified it silently overwrites existing destination files, otherwise returns an os.Exists.

Permissions of source files and directories carry over to destinations.

If any other error occurs is returned and it will be of type *os.PathError.

func Exists added in v0.0.2

func Exists(filename string) (bool, error)

Exists returns if the file specified by filename exists. If an error occurs it is returned and the exists result is invalid.

func Touch

func Touch(filename string) error

Touch updates access and modification times of specified file. It creates any required directories along the optionally specified path. If the file does not exist it is created. If an error occurs it is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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