fileutils

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package fileutils provides some helper functions for file / directory copying

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source string, dest string) (err error)

CopyFile copies the source file to the destination path. If dest is a directory, the dest file name will have the same name as source.

func CpR

func CpR(srcdir, destdir string, reject ...string) error

CpR copies every file in sourcedir into destdir while rejecting anything that is in reject. reject must contain file names, not full paths. Beware: this function behaves a bit weird.

func IsDir

func IsDir(path string) bool

IsDir returns true if the given path exists and is a directory.

func IsExeFile

func IsExeFile(path string) bool

IsExeFile returns true if the path exists and is a regular file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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