Documentation
¶
Index ¶
- func ClearDirectory(path string, flat bool) error
- func Copy(src, dest string) (int64, error)
- func Delete(fname string) error
- func Exists(fname string) bool
- func GenerateRandomFilename(url, root, path string) (string, string, error)
- func Mkdir(path string) error
- func Move(src, dst string) error
- func Read(fname string) ([]byte, error)
- func Rmdir(path string) error
- func TouchWithPath(fname string, template string) error
- func URLFileExtension(addr string) string
- type FileInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearDirectory ¶
func GenerateRandomFilename ¶
func TouchWithPath ¶
TouchWithPath ensures that file "fname" exists. If file does not exist, it is created as a copy of the specified template, including all the necessary parent directories.
func URLFileExtension ¶
Types ¶
type FileInterface ¶
type FileInterface interface {
Exists(fname string) bool
Copy(src, dest string) (int64, error)
Delete(fname string) error
Mkdir(path string) error
Rmdir(path string) error
Move(src, dst string) error
URLFileExtension(addr string) string
Read(fname string) (contents []byte, err error)
TouchWithPath(fname string, template string) error
ClearDirectory(path string) error
}
Click to show internal directories.
Click to hide internal directories.