Example #1
1
File: util.go Project: NetSys/quilt
// WriteFile writes 'data' to the file 'filename' with the given permissions.
func WriteFile(filename string, data []byte, perm os.FileMode) error {
	a := afero.Afero{
		Fs: AppFs,
	}
	return a.WriteFile(filename, data, perm)
}
Example #2
0
File: io.go Project: NetSys/quilt
func overwrite(file string, message string) error {
	a := afero.Afero{
		Fs: appFs,
	}
	return a.WriteFile(file, []byte(message), 0666)
}