Documentation
¶
Index ¶
- func CopyDir(fs afero.Fs, src, dest string) error
- func CopyFile(fs afero.Fs, src, dest string, perm os.FileMode) error
- func CopyReader(fs afero.Fs, r io.Reader, dest string, perm os.FileMode) error
- func DetectMediaType(fs afero.Fs, path string) (string, error)
- func ReadSecureFile(fs afero.Fs, filename string) ([]byte, error)
- func Unzip(fs afero.Fs, src, dest string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyReader ¶
CopyReader copies an io.Reader into a given destination.
func DetectMediaType ¶
DetectMediaType detects a file's media type, as defined in https://www.iana.org/assignments/media-types/media-types.xhtml.
func ReadSecureFile ¶
ReadSecureFile ensures a file has 0400 or 0600 permissions before reading it. Permissions check is skipped on Windows as it uses a different mechanism than UNIX.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.