Docs updates; CocoaPods 16.0 release; [ci skip]

This commit is contained in:
Max Howell
2019-02-08 09:14:23 -05:00
parent 8033ae49b4
commit ed45d10179
3 changed files with 6 additions and 11 deletions

View File

@@ -91,7 +91,7 @@ jobs:
- name: CocoaPods - name: CocoaPods
before_install: export TRAVIS_REPO_NAME=${TRAVIS_REPO_SLUG#*/} before_install: export TRAVIS_REPO_NAME=${TRAVIS_REPO_SLUG#*/}
install: gem install cocoapods --pre install: gem install cocoapods
before_script: | before_script: |
export DESCRIPTION=$(swift - <<\ \ EOF export DESCRIPTION=$(swift - <<\ \ EOF
import Foundation import Foundation

View File

@@ -1,7 +1,4 @@
import Foundation import Foundation
//#if os(Linux)
//import func Glibc.chmod
//#endif
public extension Path { public extension Path {
//MARK: Filesystem Attributes //MARK: Filesystem Attributes
@@ -40,15 +37,12 @@ public extension Path {
*/ */
@discardableResult @discardableResult
func chmod(_ octal: Int) throws -> Path { func chmod(_ octal: Int) throws -> Path {
// #if os(Linux)
// Glibc.chmod(string, __mode_t(octal))
// #else
try FileManager.default.setAttributes([.posixPermissions: octal], ofItemAtPath: string) try FileManager.default.setAttributes([.posixPermissions: octal], ofItemAtPath: string)
// #endif
return self return self
} }
/** /**
Applies the macOS filesystem lock attribute.
- Note: If file is already locked, does nothing. - Note: If file is already locked, does nothing.
- Note: If file doesnt exist, throws. - Note: If file doesnt exist, throws.
- Important: On Linux does nothing. - Important: On Linux does nothing.
@@ -70,6 +64,7 @@ public extension Path {
- Note: If file isnt locked, does nothing. - Note: If file isnt locked, does nothing.
- Note: If file doesnt exist, does nothing. - Note: If file doesnt exist, does nothing.
- Important: On Linux does nothing. - Important: On Linux does nothing.
- SeeAlso: `lock()`
*/ */
@discardableResult @discardableResult
func unlock() throws -> Path { func unlock() throws -> Path {

View File

@@ -57,7 +57,7 @@ public extension Path {
`self` because even though *Path.swifts* policy is to noop if the desired `self` because even though *Path.swifts* policy is to noop if the desired
end result preexists, checking for this condition is too expensive a end result preexists, checking for this condition is too expensive a
trade-off. trade-off.
- SeeAlso: `copy(into:overwrite:)` - SeeAlso: `copy(to:overwrite:)`
*/ */
@discardableResult @discardableResult
func copy(into: Path, overwrite: Bool = false) throws -> Path { func copy(into: Path, overwrite: Bool = false) throws -> Path {
@@ -91,7 +91,7 @@ public extension Path {
`self` because even though *Path.swifts* policy is to noop if the desired `self` because even though *Path.swifts* policy is to noop if the desired
end result preexists, checking for this condition is too expensive a end result preexists, checking for this condition is too expensive a
trade-off. trade-off.
- SeeAlso: move(into:overwrite:) - SeeAlso: `move(into:overwrite:)`
*/ */
@discardableResult @discardableResult
func move(to: Path, overwrite: Bool = false) throws -> Path { 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`. - Parameter overwrite: If true *overwrites* any file that already exists at `into`.
- Note: `throws` if `into` is a file. - Note: `throws` if `into` is a file.
- Returns: The `Path` of destination filename. - Returns: The `Path` of destination filename.
- SeeAlso: move(into:overwrite:) - SeeAlso: `move(to:overwrite:)`
*/ */
@discardableResult @discardableResult
func move(into: Path, overwrite: Bool = false) throws -> Path { func move(into: Path, overwrite: Bool = false) throws -> Path {