From 3e964833ffa1f7aae96ef1c0ea55f083369a3411 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 18 Jan 2020 12:04:11 -0500 Subject: [PATCH] Fix README documentation for `Finder` --- README.md | 4 ++-- Tests/PathTests/PathTests+ls().swift | 2 +- Tests/PathTests/XCTestManifests.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1a3d46e..3781d66 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ Path.home.find().execute { path in Which is configurable: ```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` 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 -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 diff --git a/Tests/PathTests/PathTests+ls().swift b/Tests/PathTests/PathTests+ls().swift index 92471a2..731cc9b 100644 --- a/Tests/PathTests/PathTests+ls().swift +++ b/Tests/PathTests/PathTests+ls().swift @@ -66,7 +66,7 @@ extension PathTests { } } - func testFindKinds() throws { + func testFindTypes() throws { try Path.mktemp { tmpdir in try tmpdir.foo.mkdir() try tmpdir.bar.touch() diff --git a/Tests/PathTests/XCTestManifests.swift b/Tests/PathTests/XCTestManifests.swift index 7bcb17c..fbea414 100644 --- a/Tests/PathTests/XCTestManifests.swift +++ b/Tests/PathTests/XCTestManifests.swift @@ -25,9 +25,9 @@ extension PathTests { ("testFileReference", testFileReference), ("testFilesystemAttributes", testFilesystemAttributes), ("testFindExtension", testFindExtension), - ("testFindKinds", testFindKinds), ("testFindMaxDepth1", testFindMaxDepth1), ("testFindMaxDepth2", testFindMaxDepth2), + ("testFindTypes", testFindTypes), ("testFlatMap", testFlatMap), ("testInitializerForRelativePath", testInitializerForRelativePath), ("testIsDirectory", testIsDirectory),