toolfile

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendText

func AppendText(filepath, text string) error

func CreateTemp

func CreateTemp(prefix string) (string, error)

CreateTemp creates a temporary file and returns its name.

func Delete

func Delete(filepath string) error

func Exists

func Exists(filepath string) bool

checks if a file exists at the specified path.

func ReadAllBytes

func ReadAllBytes(filepath string) ([]byte, error)

reads the entire file content as a byte array.

func ReadAllLines

func ReadAllLines(filepath string) ([]string, error)

func ReadAllText

func ReadAllText(filepath string) (string, error)

reads the entire file content as a text string.

func Rename

func Rename(oldPath, newPath string) error

func WriteAllText

func WriteAllText(filepath, text string) error

writes all text to a file.

func WriteBytes

func WriteBytes(filepath string, data []byte) error

writes all bytes to a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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