Documentation ¶
Index ¶
- func CopyDir(src, dst string, buf []byte, perm os.FileMode, ignoreType os.FileMode) error
- func CopyFile(src, dst string, buf []byte, perm os.FileMode) error
- func RemoveDirs(dir string) error
- func TryLinkDir(src, dst string, buf []byte, perm os.FileMode, ignoreType os.FileMode) error
- func TryLinkFile(src, dst string, buf []byte, perm os.FileMode) error
- type InvalidTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode is set to perm and the copied data is synced/flushed to stable storage.
func RemoveDirs ¶ added in v0.1.2
Always returns non-nil error which is the last error of os.Remove(dir)
func TryLinkDir ¶ added in v0.2.0
TryLinkDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist.
Types ¶
type InvalidTypeError ¶ added in v0.2.0
type InvalidTypeError struct {
Filename string
}
func (*InvalidTypeError) Error ¶ added in v0.2.0
func (e *InvalidTypeError) Error() string