Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies the directory at path src to a new directory at path dst. If a symlink is encountered along the way, its link is copied verbatim and installed in the destination directory hierarchy, as in CopySymlink.
If srcFS != nil, then src is assumed to be a path within srcFS.
dst and directories under dst may not retain the permissions of src or the corresponding directories under src. Instead, we always set the permissions of the new directories to 0755.
func CopyFile ¶
CopyFile copies a file at path src to dst. sfinfo is the os.FileInfo associated with the file at path src and must be derived from it. sfinfo may be nil, in which case the file at src is queried for its os.FileInfo, and symbolic links are followed.
In effect, sfinfo is just an optimization to avoid querying the path for the os.FileInfo more than necessary.
Thus, CopyFile always copies the bytes of the file at src to a new file created at dst with the same file mode as the old one.
If srcFS != nil, then src is assumed to be a path within srcFS.
Returns a non-nil error if copying or acquiring the os.FileInfo for the file fails.
func FileExists ¶
FileExists returns true if a file or directory exists at the specified path, otherwise it returns false. If an error is encountered while checking, an error is returned.
Types ¶
This section is empty.