Make PathElement initializer explicitly public (#31)

Also, fix doc comments
This commit is contained in:
Javier Cuesta 2024-12-13 23:18:23 +01:00 committed by GitHub
parent 1d0bf43b4b
commit 7d451c59cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -35,8 +35,8 @@ public protocol BaseReader {
/// birds:catalog/swallow.pkl /// birds:catalog/swallow.pkl
/// ``` /// ```
/// ///
/// The first URI conveys name "fred.pkl" within parent "/persons/". The second URI /// The first URI conveys name "swallow.pkl" within parent "/catalog/". The second URI
/// conveys the name "persons/fred.pkl" with no hierarchical meaning. /// conveys the name "catalog/swallow.pkl" with no hierarchical meaning.
var hasHierarchicalUris: Bool { get } var hasHierarchicalUris: Bool { get }
/// Returns elements at a specified path. /// Returns elements at a specified path.
@ -107,6 +107,11 @@ public struct PathElement {
/// Whether the element is a directory or not. /// Whether the element is a directory or not.
public let isDirectory: Bool public let isDirectory: Bool
public init(name: String, isDirectory: Bool) {
self.name = name
self.isDirectory = isDirectory
}
} }
extension PathElement { extension PathElement {