ioutil

package
v0.0.0-...-2c762cd Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWriteFile

func AtomicWriteFile(filename string, data []byte) error

AtomicWriteFile atomically writes data to filename.

func Exists

func Exists(path string) bool

Exists returns true if the given path exists.

func IsDir

func IsDir(path string) bool

IsDir returns true if the given path points to an existing directory.

func IsExecutable

func IsExecutable(path string) bool

IsExecutable returns true if the given path points to an executable file.

func IsFile

func IsFile(path string) bool

IsFile returns true if the given path points to an existing regular file.

func ReaderToBytes

func ReaderToBytes(reader io.Reader) []byte

ReaderToBytes returns the content of a reader as a byte array. Read errors are ignored.

func ReaderToJSON

func ReaderToJSON(reader io.Reader) string

ReaderToJSON returns the contents of reader as indented JSON. Read errors are ignored.

func ReaderToString

func ReaderToString(reader io.Reader) string

ReaderToString Returns the content of reader as a string. Read errors are ignored.

func StringToJSON

func StringToJSON(s string) string

StringToJSON returns string s as indented JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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