utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dest string) error

CopyDir recursively copies the content of a source dir to the specified destination. nolint: wrapcheck

func CopyFile

func CopyFile(src, dest string, permissions int) error

CopyFile copies the content of the source file to the specified destination. nolint: wrapcheck,gosec

func Exists

func Exists(path string) bool

Exists returns true if the path exists.

func IsDirectory

func IsDirectory(path string) bool

IsDirectory returns true if the specified path is a directory.

func IsFile

func IsFile(path string) bool

IsFile returns true if the specific path is a file.

func LinkFile

func LinkFile(src, dest string) error

LinkFile symlinks a source file to its destination. nolint: wrapcheck

func MD5Sum

func MD5Sum(content []byte) string

MD5Sum computes the md5sum of a byte array.

func ReadFile

func ReadFile(path string) []byte

ReadFile rerads a file.

func RemoveFile

func RemoveFile(path string) error

RemoveFile deletes a file and all its children. nolint: wrapcheck

func WriteFile

func WriteFile(content []byte, dest string, permissions int) error

WriteFile writes the content to the destination file. nolint: wrapcheck

Types

This section is empty.

Jump to

Keyboard shortcuts

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