fileutil

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 7 Imported by: 175

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendBytesToFile

func AppendBytesToFile(pth string, fileCont []byte) error

AppendBytesToFile ...

func AppendStringToFile

func AppendStringToFile(pth string, fileCont string) error

AppendStringToFile ...

func GetFileModeOfFile

func GetFileModeOfFile(pth string) (os.FileMode, error)

GetFileModeOfFile ...

this is the "permissions" info, which can be passed directly to
functions like WriteBytesToFileWithPermission or os.OpenFile

func GetFilePermissions

func GetFilePermissions(filePth string) (os.FileMode, error)

GetFilePermissions ...

  • alias of: GetFileModeOfFile this is the "permissions" info, which can be passed directly to functions like WriteBytesToFileWithPermission or os.OpenFile

func ReadBytesFromFile

func ReadBytesFromFile(pth string) ([]byte, error)

ReadBytesFromFile ...

func ReadStringFromFile

func ReadStringFromFile(pth string) (string, error)

ReadStringFromFile ...

func WriteBytesToFile

func WriteBytesToFile(pth string, fileCont []byte) error

WriteBytesToFile ...

func WriteBytesToFileWithPermission

func WriteBytesToFileWithPermission(pth string, fileCont []byte, perm os.FileMode) error

WriteBytesToFileWithPermission ...

func WriteJSONToFile

func WriteJSONToFile(pth string, fileCont interface{}) error

WriteJSONToFile ...

func WriteStringToFile

func WriteStringToFile(pth string, fileCont string) error

WriteStringToFile ...

func WriteStringToFileWithPermission

func WriteStringToFileWithPermission(pth string, fileCont string, perm os.FileMode) error

WriteStringToFileWithPermission ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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