filetools

package
v0.0.0-...-9799ab4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: GPL-3.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyTree

func CopyTree(
	src_path string,
	dst_path string,
	dst_not_empty_is_error bool,
	clear_dst_dir bool,
	files_already_exists_is_error bool,
	overwrite_existing_files bool,
	log logger.LoggerI,
	verbose_log bool,
	pass_log bool,
	copy_file_cb func(src, dst string, log logger.LoggerI) error,
) error

Walks inside src_path and copying files to dst_path

func CopyWithInfo

func CopyWithInfo(src, dst string, log logger.LoggerI) error

func CopyWithOptions

func CopyWithOptions(
	src string,
	dst string,
	log logger.LoggerI,
	copyinfo bool,
	dereference_symlinks bool,
) error

func ListDir

func ListDir(pth string) ([]os.FileInfo, []os.FileInfo, error)

func Walk

func Walk(
	pth string,
	target func(
		dir string,
		dirs []os.FileInfo,
		files []os.FileInfo,
	) error,
) error

TODO: no_symlink_delve option or somethin similar. symleanks should be dealth with

func Which

func Which(executable_name string, under []string) (string, error)

Types

type Is

type Is os.FileMode

func (Is) Regular

func (self Is) Regular() bool
func (self Is) Symlink() bool

type WalkerI

type WalkerI interface {
	ListDir(pth string) ([]os.FileInfo, []os.FileInfo, error)
	Walk(
		pth string,
		target func(
			dir string,
			dirs []os.FileInfo,
			files []os.FileInfo,
		) error,
	) error
	Tree(pth string) (map[string]os.FileInfo, error)
}

Jump to

Keyboard shortcuts

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