Fix README documentation for Finder
This commit is contained in:
@@ -183,7 +183,7 @@ Path.home.find().execute { path in
|
|||||||
Which is configurable:
|
Which is configurable:
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
Path.home.find().maxDepth(1).extension("swift").kind(.file) { path in
|
Path.home.find().depth(max: 1).extension("swift").type(.file) { path in
|
||||||
//…
|
//…
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -300,7 +300,7 @@ for that as the check was deemed too expensive to be worthwhile.
|
|||||||
If a `Path` is a symlink but the destination of the link does not exist `exists`
|
If a `Path` is a symlink but the destination of the link does not exist `exists`
|
||||||
returns `false`. This seems to be the correct thing to do since symlinks are
|
returns `false`. This seems to be the correct thing to do since symlinks are
|
||||||
meant to be an abstraction for filesystems. To instead verify that there is
|
meant to be an abstraction for filesystems. To instead verify that there is
|
||||||
no filesystem entry there at all check if `kind` is `nil`.
|
no filesystem entry there at all check if `type` is `nil`.
|
||||||
|
|
||||||
|
|
||||||
## We do not provide change directory functionality
|
## We do not provide change directory functionality
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ extension PathTests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func testFindKinds() throws {
|
func testFindTypes() throws {
|
||||||
try Path.mktemp { tmpdir in
|
try Path.mktemp { tmpdir in
|
||||||
try tmpdir.foo.mkdir()
|
try tmpdir.foo.mkdir()
|
||||||
try tmpdir.bar.touch()
|
try tmpdir.bar.touch()
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ extension PathTests {
|
|||||||
("testFileReference", testFileReference),
|
("testFileReference", testFileReference),
|
||||||
("testFilesystemAttributes", testFilesystemAttributes),
|
("testFilesystemAttributes", testFilesystemAttributes),
|
||||||
("testFindExtension", testFindExtension),
|
("testFindExtension", testFindExtension),
|
||||||
("testFindKinds", testFindKinds),
|
|
||||||
("testFindMaxDepth1", testFindMaxDepth1),
|
("testFindMaxDepth1", testFindMaxDepth1),
|
||||||
("testFindMaxDepth2", testFindMaxDepth2),
|
("testFindMaxDepth2", testFindMaxDepth2),
|
||||||
|
("testFindTypes", testFindTypes),
|
||||||
("testFlatMap", testFlatMap),
|
("testFlatMap", testFlatMap),
|
||||||
("testInitializerForRelativePath", testInitializerForRelativePath),
|
("testInitializerForRelativePath", testInitializerForRelativePath),
|
||||||
("testIsDirectory", testIsDirectory),
|
("testIsDirectory", testIsDirectory),
|
||||||
|
|||||||
Reference in New Issue
Block a user