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
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
RemoveDirs removes dir and its parent directories until the directory is not empty. This 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 ¶
This section is empty.