fs

package
v0.0.0-...-e585b59 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEmptyFile

func CreateEmptyFile(path string) error

func CreateFileBackup

func CreateFileBackup(fName string)

func CreateFileWithContent

func CreateFileWithContent(path, content string) error

func RandomNumberSuffix

func RandomNumberSuffix(name string) string

The suffix will consist of 128 bits of non-secure randomness composed in 32 hex digits, 16 bytes. For example, for "name-here" the call will produce something like "name-here-7d03f3e265dace994308fc812e9ab366"

func RandomTmpFileName

func RandomTmpFileName() string

func RevealWildcardPaths

func RevealWildcardPaths(paths []string) []string

func StartFileWatcher

func StartFileWatcher(path string, fsEventHanlder func(event fsnotify.Event), done chan struct{}, logger log.Logger) (watcher *fsnotify.Watcher, err error)

func TouchFile

func TouchFile(path string) error

func WriteContentIfNeed

func WriteContentIfNeed(file string, newContent []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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