@@ -65,7 +65,6 @@ extension FilePath {
6565 /// path.starts(with: "/usr/bin/ls") // true
6666 /// path.starts(with: "/usr/bin/ls///") // true
6767 /// path.starts(with: "/us") // false
68- ///
6968 public func starts( with other: FilePath ) -> Bool {
7069 guard !other. isEmpty else { return true }
7170 return self . root == other. root && components. starts (
@@ -85,7 +84,6 @@ extension FilePath {
8584 /// path.ends(with: "usr/bin/ls") // true
8685 /// path.ends(with: "/usr/bin/ls///") // true
8786 /// path.ends(with: "/ls") // false
88- ///
8987 public func ends( with other: FilePath ) -> Bool {
9088 if other. root != nil {
9189 // TODO: anything tricky here for Windows?
@@ -145,7 +143,6 @@ extension FilePath {
145143 /// path.root = nil // path is #"foo\bar"#
146144 /// path.root = "C:" // path is #"C:foo\bar"#
147145 /// path.root = #"C:\"# // path is #"C:\foo\bar"#
148- ///
149146 public var root : FilePath . Root ? {
150147 get {
151148 guard _hasRoot else { return nil }
@@ -178,7 +175,6 @@ extension FilePath {
178175 /// * `\\?\device\folder\file.exe => folder\file.exe`
179176 /// * `\\server\share\file => file`
180177 /// * `\ => ""`
181- ///
182178 public __consuming func removingRoot( ) -> FilePath {
183179 var copy = self
184180 copy. root = nil
@@ -209,7 +205,6 @@ extension FilePath {
209205 /// * `\\?\UNC\server\share\bar.exe => bar.exe`
210206 /// * `\\server\share => nil`
211207 /// * `\\?\UNC\server\share\ => nil`
212- ///
213208 public var lastComponent : Component ? { components. last }
214209
215210 /// Creates a new path with everything up to but not including
@@ -247,7 +242,6 @@ extension FilePath {
247242 /// path.removeLastComponent() == true // path is "/usr"
248243 /// path.removeLastComponent() == true // path is "/"
249244 /// path.removeLastComponent() == false // path is "/"
250- ///
251245 @discardableResult
252246 public mutating func removeLastComponent( ) -> Bool {
253247 defer { _invariantCheck ( ) }
@@ -271,7 +265,6 @@ extension FilePath.Component {
271265 /// * `Foo.app => app`
272266 /// * `.hidden => nil`
273267 /// * `.. => nil`
274- ///
275268 public var `extension` : String ? {
276269 guard let range = _extensionRange ( ) else { return nil }
277270 return _slice [ range] . string
@@ -285,7 +278,6 @@ extension FilePath.Component {
285278 /// * `Foo.app => Foo`
286279 /// * `.hidden => .hidden`
287280 /// * `.. => ..`
288- ///
289281 public var stem : String {
290282 _slice [ _stemRange ( ) ] . string
291283 }
@@ -322,7 +314,6 @@ extension FilePath {
322314 /// path.extension = "o" // path is "/tmp/file.o"
323315 /// path.extension = nil // path is "/tmp/file"
324316 /// path.extension = "" // path is "/tmp/file."
325- ///
326317 public var `extension` : String ? {
327318 get { lastComponent? . extension }
328319 set {
@@ -451,7 +442,6 @@ extension FilePath {
451442 /// path.removePrefix("/usr/bin") // false
452443 /// path.removePrefix("/us") // false
453444 /// path.removePrefix("/usr/local") // true, path is "bin"
454- ///
455445 public mutating func removePrefix( _ prefix: FilePath ) -> Bool {
456446 defer { _invariantCheck ( ) }
457447 // FIXME: Should Windows have more nuanced semantics?
@@ -473,7 +463,6 @@ extension FilePath {
473463 /// path.append(comp)
474464 /// }
475465 /// // path is "/tmp/foo/bar/../baz"
476- ///
477466 public mutating func append( _ component: __owned FilePath. Component ) {
478467 defer { _invariantCheck ( ) }
479468 _append ( unchecked: component. _slice)
@@ -488,7 +477,6 @@ extension FilePath {
488477 /// path.append(["usr", "local"]) // path is "/usr/local"
489478 /// let otherPath: FilePath = "/bin/ls"
490479 /// path.append(otherPath.components) // path is "/usr/local/bin/ls"
491- ///
492480 public mutating func append< C: Collection > (
493481 _ components: __owned C
494482 ) where C. Element == FilePath . Component {
@@ -510,7 +498,6 @@ extension FilePath {
510498 /// path.append("/var/www/website") // "/var/www/website"
511499 /// path.append("static/assets") // "/var/www/website/static/assets"
512500 /// path.append("/main.css") // "/var/www/website/static/assets/main.css"
513- ///
514501 public mutating func append( _ other: __owned String) {
515502 defer { _invariantCheck ( ) }
516503 guard !other. utf8. isEmpty else { return }
@@ -524,7 +511,6 @@ extension FilePath {
524511
525512 // TODO(Windows docs): example with roots
526513 /// Non-mutating version of `append(_:Component)`.
527- ///
528514 public __consuming func appending( _ other: __owned Component) -> FilePath {
529515 var copy = self
530516 copy. append ( other)
@@ -533,7 +519,6 @@ extension FilePath {
533519
534520 // TODO(Windows docs): example with roots
535521 /// Non-mutating version of `append(_:C)`.
536- ///
537522 public __consuming func appending< C: Collection > (
538523 _ components: __owned C
539524 ) -> FilePath where C. Element == FilePath . Component {
@@ -544,7 +529,6 @@ extension FilePath {
544529
545530 // TODO(Windows docs): example with roots
546531 /// Non-mutating version of `append(_:String)`.
547- ///
548532 public __consuming func appending( _ other: __owned String) -> FilePath {
549533 var copy = self
550534 copy. append ( other)
@@ -566,7 +550,6 @@ extension FilePath {
566550 /// var path: FilePath = "/tmp"
567551 /// path.push("dir/file.txt") // path is "/tmp/dir/file.txt"
568552 /// path.push("/bin") // path is "/bin"
569- ///
570553 public mutating func push( _ other: __owned FilePath) {
571554 defer { _invariantCheck ( ) }
572555 guard other. root == nil else {
@@ -579,7 +562,6 @@ extension FilePath {
579562
580563 // TODO(Windows docs): examples and docs with roots
581564 /// Non-mutating version of `push()`.
582- ///
583565 public __consuming func pushing( _ other: __owned FilePath) -> FilePath {
584566 var copy = self
585567 copy. push ( other)
0 commit comments