mirror of https://github.com/apple/pkl-swift
Make PathElement initializer explicitly public (#31)
Also, fix doc comments
This commit is contained in:
parent
1d0bf43b4b
commit
7d451c59cd
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue