paths

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package paths is responsible for pathing operations/commands

Package paths is responsible for pathing operations/commands

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoSourceFile indicates the source file for copy does NOT exist
	ErrNoSourceFile = errors.New("source file does not exist")
	// ErrDestExists indicates that the destination already exists
	ErrDestExists = errors.New("destination file exists")
	// ErrModeMismatch means that the destination overwrite would be changing mode
	ErrModeMismatch = errors.New("overwrite will change mode")
)

Functions

func Copy

func Copy(src, dst string, mode fs.FileMode) error

Copy will copy a file from source to destination but will not overwrite

func CopyOverwrite

func CopyOverwrite(src, dst string, mode fs.FileMode) error

CopyOverwrite is the same as Copy however it will overwrite the destination UNLESS the file mode is different than what was given

func Exist

func Exist(file string) bool

Exist indicates whether a path exists (true) or not (false)

Types

This section is empty.

Jump to

Keyboard shortcuts

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