Documentation
¶
Index ¶
- func CurrentDir() (currentDir string)
- func Delete(name string)
- func DeleteAll(path string)
- func EnsureDirExists(path string)
- func EnsureFileWritable(filename string)
- func IsExist(filename string) bool
- func IsWritable(filename string) bool
- func OpenWrite(filename string) (*os.File, error)
- func WriteFile(filename string, data []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentDir ¶
func CurrentDir() (currentDir string)
CurrentDir return the directory where the program is located.
func Delete ¶
func Delete(name string)
Delete removes the named file or directory. not mind for error
func DeleteAll ¶
func DeleteAll(path string)
DeleteAll removes path and any children it contains. not mind for error
func EnsureDirExists ¶
func EnsureDirExists(path string)
EnsureDirExists create all directory if not exists Example:
EnsureDirExists("/foo/bar/baz.js") // the following directory will be created: /foo/bar/ EnsureDirExists("/foo/bar/baz/") // the following directory will be created: /foo/bar/baz/
func EnsureFileWritable ¶
func EnsureFileWritable(filename string)
EnsureFileWritable make file writable if not
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.