shared

package module
v0.0.0-...-1fa7cc9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileAppend

func FileAppend(name string, b []byte) error

append to file with fs.ErrNotExist

WARN: perhaps behaviour with async

func GitOpenOrInit

func GitOpenOrInit(path string) (repo *git.Repository, initted bool, err error)

func GitWriteAdd

func GitWriteAdd(repo *git.Repository, relpath string, data []byte, perm fs.FileMode) error

writes a file, and adds it

func OpenFileExisting

func OpenFileExisting(name string, flag int) (*os.File, error)

os.OpenFile, but fs.ErrNotExist

func PWDIfEmpty

func PWDIfEmpty(path string) (string, error)

returns path, or $PWD if path empty

func PathResolveTilde

func PathResolveTilde(path string) (string, error)

func RenameNoOverwrite

func RenameNoOverwrite(oldpath, newpath string) error

os.Rename(), but newpath:fs.ErrExist

Types

This section is empty.

Jump to

Keyboard shortcuts

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