Improve docs

This commit is contained in:
Max Howell
2019-01-21 13:23:40 -05:00
parent 21fb03b9d9
commit 43d3e0a745
5 changed files with 29 additions and 13 deletions

View File

@@ -22,6 +22,9 @@ public extension Path {
Copies a file into a directory
If the destination does not exist, this function creates the directory first.
// Create ~/.local/bin, copy `ls` there and make the new copy executable
try Path.root.join("bin/ls").copy(into: Path.home.join(".local/bin").mkpath()).chmod(0o500)
- Note: `throws` if `into` is a file.
- Parameter into: Destination directory