io

package
v0.0.0-...-df03e99 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BufferSize = 1024

Variables

View Source
var (
	DefaultFilePerm   os.FileMode = 0664
	DefaultFolderPerm os.FileMode = 0664
)

Functions

func CreateFolders

func CreateFolders(path string, perm os.FileMode) error

func DecodeBase64

func DecodeBase64(encoded []byte) ([]byte, error)

func EncodeBase64

func EncodeBase64(decoded []byte) ([]byte, error)

func ExistsFile

func ExistsFile(path string) bool

func GetCurrentPath

func GetCurrentPath() string

Retrieves Current Path

func GetShareLibExt

func GetShareLibExt() string

Gets the Shared libraries extension included by dot, related to current O/S

func HomeFolder

func HomeFolder() string

Retrieves Home directory

func IsFolder

func IsFolder(path string) bool

func Marshal

func Marshal(encodingValue encoding.Encoding, target interface{}) ([]byte, error)

Marshal given interface (pointer to structure) in bytes with given encoding type

func MarshalToFile

func MarshalToFile(file string, perm os.FileMode, encoding encoding.Encoding, target interface{}) error

Marshal given interface (pointer to structure) bytes to given file path with given encoding type

func ReadFile

func ReadFile(path string) ([]byte, error)

func TempFolder

func TempFolder() string

func UniqueTempFolder

func UniqueTempFolder(suffix string) string

func Unmarshal

func Unmarshal(data []byte, encodingValue encoding.Encoding, target interface{}) error

Unmarshal bytes and fill the given interface (pointer to structure) with given encoding type

func UnmarshalFile

func UnmarshalFile(file string, encodingValue encoding.Encoding, target interface{}) error

Unmarshal bytes in given file path and fill the given interface (pointer to structure) with given encoding type

func WriteFile

func WriteFile(path string, data []byte, perm os.FileMode, override bool) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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