ioutil

package
v0.0.119 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAll

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

AppendAll appends data to a file named by filename. If the file does not exist, AppendAll creates it with mode 0666 (before umask) If the dir does not exist, AppendAll creates it with 0755 (before umask) (before umask); otherwise AppendAll appends it before writing, without changing permissions.

func AppendFileAll

func AppendFileAll(filename string, data []byte, dirperm, fileperm os.FileMode) error

AppendFileAll appends data to a file named by filename. If the file does not exist, WriteFileAll creates it with permissions fileperm If the dir does not exist, WriteFileAll creates it with permissions dirperm (before umask); otherwise WriteFileAll appends it before writing, without changing permissions.

func WriteAll

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

WriteAll writes data to a file named by filename. If the file does not exist, WriteAll creates it with mode 0666 (before umask) If the dir does not exist, WriteAll creates it with 0755 (before umask) (before umask); otherwise WriteAll truncates it before writing, without changing permissions.

func WriteFileAll

func WriteFileAll(filename string, data []byte, dirperm, fileperm os.FileMode) error

WriteFileAll is the generalized open call; most users will use WriteAll instead. It writes data to a file named by filename. If the file does not exist, WriteFileAll creates it with permissions fileperm If the dir does not exist, WriteFileAll creates it with permissions dirperm (before umask); otherwise WriteFileAll truncates it before writing, without changing permissions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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