fileutils

package
v0.0.0-...-7a6e8ff Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

func DoesFileExists

func DoesFileExists(name string) (bool, error)

func ExtractTarGzFile

func ExtractTarGzFile(sourceFile, target string) error

func GetAbsolutePath

func GetAbsolutePath(relativePath string) string

func GetPathToCurrentBinary

func GetPathToCurrentBinary() (string, error)

func HasWritePermissionToFile

func HasWritePermissionToFile(filePath string) (bool, error)

syscall for unix-based instead of open

func SafeMoveFile

func SafeMoveFile(source, target string, showLogs bool) (err error)

os.Rename panics with "invalid cross-device link" for cases where the source is on a different volume or if the source volume is masked like in some linux systems and hence we attempt to perform copy+delete to replicate a move operation with added backup fallbacks

Types

This section is empty.

Jump to

Keyboard shortcuts

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