Documentation
¶
Index ¶
- func Append(filename string) (*os.File, error)
- func Create(filename string) (*os.File, error)
- func DataPath(sub string) string
- func LoadState(dir, name string, v interface{}) (err error)
- func MkdirAll(dir string) error
- func Open(filename string) (file *os.File, err error)
- func ReadDir(dir string) ([]os.FileInfo, error)
- func ReadFile(filename string) (b []byte, err error)
- func Remove(name string) error
- func ResPath(sub string) string
- func SaveState(dir, name string, v interface{}) (err error)
- func Stat(name string) (info os.FileInfo, err error)
- func Truncate(name string, size int64) error
- func WriteFile(filename string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR. If there is an error, it will be of type *PathError.
func MkdirAll ¶
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error.
func Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY. If there is an error, it will be of type *PathError.
func ReadDir ¶
ReadDir reads the directory named by dirname and returns a list of directory entries sorted by filename.
func ReadFile ¶
ReadFile reads the file named by filename and returns the contents. A successful call returns err == nil, not err == EOF. Because ReadFile reads the whole file, it does not treat an EOF from Read as an error to be reported.
func Remove ¶
Remove removes the named file or directory. If there is an error, it will be of type *PathError.
func Stat ¶
Stat returns a FileInfo describing the named file. If there is an error, it will be of type *PathError.
Types ¶
This section is empty.