fileutils

package
v2.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPrefix added in v2.7.0

func CommonPrefix(sep byte, paths ...string) string

CommonPrefix returns common directory path of provided files

func Copy

func Copy(fs afero.Fs, src, dst string) error

Copy copies a file or folder from one place to another.

func CopyDir

func CopyDir(fs afero.Fs, source, dest string) error

CopyDir copies a directory from source to dest and all of its sub-directories. It doesn't stop if it finds an error during the copy. Returns an error if any.

func CopyFile

func CopyFile(fs afero.Fs, source, dest string) error

CopyFile copies a file from source to dest and returns an error if any.

func MoveFile added in v2.11.0

func MoveFile(fs afero.Fs, src, dst string) error

MoveFile moves file from src to dst. By default the rename filesystem system call is used. If src and dst point to different volumes the file copy is used as a fallback

Types

This section is empty.

Jump to

Keyboard shortcuts

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