@@ -175,9 +175,9 @@ extension Path {
175175
176176/// Represents an absolute file system path, independently of what (or whether
177177/// anything at all) exists at that path in the file system at any given time.
178- /// An absolute path always starts with a `/` character, and holds a normalized
179- /// string representation. This normalization is strictly syntactic, and does
180- /// not access the file system in any way.
178+ /// An absolute path always holds a normalized string representation. This
179+ /// normalization is strictly syntactic, and does not access the file system
180+ /// in any way.
181181///
182182/// The absolute path string is normalized by:
183183/// - Collapsing `..` path components
@@ -197,7 +197,7 @@ public struct AbsolutePath: Path {
197197 /// Underlying type, based on SwiftSystem.
198198 public let filepath : FilePath
199199
200- /// Public initializer with FilePath.
200+ /// Public initializer with ` FilePath`` .
201201 public init ( _ filepath: FilePath ) {
202202#if os(Windows)
203203 if filepath. isAbsolute {
@@ -220,6 +220,11 @@ public struct AbsolutePath: Path {
220220 /// not interpret leading `~` characters as home directory specifiers).
221221 /// The input string will be normalized if needed, as described in the
222222 /// documentation for AbsolutePath.
223+ ///
224+ /// On Unix-like systems, an absolute path always starts with a `/`
225+ /// character. Windows normally regards `/` as a relative root, but for
226+ /// compatibility, system drive letter will be appended. Use
227+ /// `try AbsolutePath(validating:)` to avoid such convention.
223228 public init ( _ absStr: String ) {
224229 self . init ( FilePath ( absStr) )
225230 }
@@ -299,20 +304,6 @@ public struct AbsolutePath: Path {
299304#endif
300305 }
301306 }
302-
303- @available ( * , deprecated, message: " use AbsolutePath(_:) directly " )
304- public static func withPOSIX( path: String ) -> AbsolutePath {
305- #if os(Windows)
306- var filepath = FilePath ( path)
307- precondition ( filepath. root != nil )
308- if !filepath. isAbsolute {
309- filepath. root = root. filepath. root
310- }
311- return AbsolutePath ( filepath)
312- #else
313- return AbsolutePath ( path)
314- #endif
315- }
316307}
317308
318309/// Represents a relative file system path. A relative path never starts with
0 commit comments