fileutil

package
v0.0.0-...-5326d5b Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearDir

func ClearDir(dir string) error

func CopyAll

func CopyAll(src, dst string) error

func CreateDevboxTempDir

func CreateDevboxTempDir() (string, error)

func EnsureAbsolutePaths

func EnsureAbsolutePaths(paths []string) ([]string, error)

func EnsureDirExists

func EnsureDirExists(path string, perm fs.FileMode, chmod bool) error

func Exists

func Exists(path string) bool

func FileContains

func FileContains(path, substring string) (bool, error)

FileContains checks if a given file at 'path' contains the 'substring'

func IsDir

func IsDir(path string) bool

IsDir returns true if the path exists *and* it is pointing to a directory.

This function will traverse symbolic links to query information about the destination file.

This is a convenience function that coerces errors to false. If it cannot read the path for any reason (including a permission error, or a broken symbolic link) it returns false.

func IsFile

func IsFile(path string) bool

IsFile returns true if the path exists *and* it is pointing to a regular file.

This function will traverse symbolic links to query information about the destination file.

This is a convenience function that coerces errors to false. If it cannot read the path for any reason (including a permission error, or a broken symbolic link) it returns false.

func Untar

func Untar(archive io.Reader, destPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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