Documentation
¶
Overview ¶
Package file provides file related implementations.
Index ¶
- func CreateDirectory(name string, fileMode os.FileMode) error
- func CreateDirectoryAll(path string, fileMode os.FileMode) error
- func List(path string, recursive bool) ([]string, error)
- func Read(fileName string) (string, error)
- func Remove(name string) error
- func RemoveAll(path string) error
- func Write(fileName string, data string, fileMode os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirectory ¶
CreateDirectory creates a directory.
ex 1) err := file.CreateDirectory(name, 0777) ex 2) err := file.CreateDirectory(name, os.ModePerm)
func CreateDirectoryAll ¶
CreateDirectoryAll creates a directory (including subdirectories).
ex 1) err := file.CreateDirectoryAll(path, 0777) ex 2) err := file.CreateDirectoryAll(path, os.ModePerm)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.