diff --git a/.travis.yml b/.travis.yml index 48f844b..523cb64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,7 +91,7 @@ jobs: - name: CocoaPods before_install: export TRAVIS_REPO_NAME=${TRAVIS_REPO_SLUG#*/} - install: gem install cocoapods --pre + install: gem install cocoapods before_script: | export DESCRIPTION=$(swift - <<\ \ EOF import Foundation diff --git a/Sources/Path+Attributes.swift b/Sources/Path+Attributes.swift index 3223f85..e8406ab 100644 --- a/Sources/Path+Attributes.swift +++ b/Sources/Path+Attributes.swift @@ -1,7 +1,4 @@ import Foundation -//#if os(Linux) -//import func Glibc.chmod -//#endif public extension Path { //MARK: Filesystem Attributes @@ -40,15 +37,12 @@ public extension Path { */ @discardableResult func chmod(_ octal: Int) throws -> Path { -// #if os(Linux) -// Glibc.chmod(string, __mode_t(octal)) -// #else try FileManager.default.setAttributes([.posixPermissions: octal], ofItemAtPath: string) -// #endif return self } /** + Applies the macOS filesystem “lock” attribute. - Note: If file is already locked, does nothing. - Note: If file doesn’t exist, throws. - Important: On Linux does nothing. @@ -70,6 +64,7 @@ public extension Path { - Note: If file isn‘t locked, does nothing. - Note: If file doesn’t exist, does nothing. - Important: On Linux does nothing. + - SeeAlso: `lock()` */ @discardableResult func unlock() throws -> Path { diff --git a/Sources/Path+FileManager.swift b/Sources/Path+FileManager.swift index 65cac90..4893864 100644 --- a/Sources/Path+FileManager.swift +++ b/Sources/Path+FileManager.swift @@ -57,7 +57,7 @@ public extension Path { `self` because even though *Path.swift’s* policy is to noop if the desired end result preexists, checking for this condition is too expensive a trade-off. - - SeeAlso: `copy(into:overwrite:)` + - SeeAlso: `copy(to:overwrite:)` */ @discardableResult func copy(into: Path, overwrite: Bool = false) throws -> Path { @@ -91,7 +91,7 @@ public extension Path { `self` because even though *Path.swift’s* policy is to noop if the desired end result preexists, checking for this condition is too expensive a trade-off. - - SeeAlso: move(into:overwrite:) + - SeeAlso: `move(into:overwrite:)` */ @discardableResult func move(to: Path, overwrite: Bool = false) throws -> Path { @@ -115,7 +115,7 @@ public extension Path { - Parameter overwrite: If true *overwrites* any file that already exists at `into`. - Note: `throws` if `into` is a file. - Returns: The `Path` of destination filename. - - SeeAlso: move(into:overwrite:) + - SeeAlso: `move(to:overwrite:)` */ @discardableResult func move(into: Path, overwrite: Bool = false) throws -> Path {