fs

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Basename

func Basename() string

Basename - Return the name of the directory the binary is being run in

func CheckExists

func CheckExists(path string) bool

CheckExists - Check if a file exists or not

func Contains

func Contains(path string, keyword string) bool

Contains ...

func Copy

func Copy(source string, destination string)

Copy ...

func EmptyDir

func EmptyDir(dir string) error

EmptyDir removes all files from a dir

func HomeDir

func HomeDir() string

HomeDir - Return the users' $HOME dir

func IsProjectRoot

func IsProjectRoot(path string) bool

IsProjectRoot ...

func Mkdir

func Mkdir(path string)

Mkdir - Check existence of folder and create if it doesn't exist

func ProjectRoot

func ProjectRoot() string

ProjectRoot - Find the root directory path for the project

func Remove

func Remove(path string)

Remove - `rm` on a file/dir

func RemoveAll

func RemoveAll(path string)

RemoveAll - `rm -rf` on a dir

func Rename

func Rename(orginal, new string) error

Rename - os Rename function

func Replace

func Replace(path string, body []byte, octal iofs.FileMode)

Replace ...

func ScanUp

func ScanUp(path string) string

ScanUp ...

func TouchByteArray

func TouchByteArray(path string, body []byte, octal fs.FileMode) error

TouchByteArray ...

func TouchEmpty

func TouchEmpty(path string, mode fs.FileMode) error

TouchEmpty ...

func TouchOrReplace

func TouchOrReplace(path string, body []byte, octal fs.FileMode)

TouchOrReplace ...

func WaitForSync

func WaitForSync(file string, retries int) (err error)

WaitForSync polls the specified file path locally until it appears

func WorkDir

func WorkDir() string

WorkDir - Return the current working directory

func Writable

func Writable(path string) bool

Writable - Check if a file/folder is writable

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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