finds.dev← search

// the find

mxcl/Path.swift

★ 960 · Swift · Unlicense · updated Jun 2026

Delightful, robust, cross-platform and chainable file-pathing functions.

Path.swift is a Swift file-system library that wraps Foundation's FileManager with a cleaner API: always-absolute paths, chainable operations, and operator-based joining via `/`. It's for Swift developers who are tired of FileManager's inconsistencies and want something that fails loudly at the right moments rather than silently doing the wrong thing.

The always-absolute-path invariant is the right call — it kills a whole class of bugs where relative paths get resolved against the wrong working directory. The `to:` vs `into:` distinction on copy/move is a genuinely thoughtful API decision that prevents the classic 'I thought it would copy into the directory' mistake. The idempotent mkdir/delete behavior (already exists? no-op, no throw) is how these operations should always work. The `find()` builder with depth/extension/type filters is a clean escape hatch when `ls()` isn't enough.

960 stars for a library from the author of Homebrew suggests this never quite caught on against the alternatives, probably because `URL` is what Apple's APIs actually consume and the conversion friction adds up. The `DynamicMemberLookup` split into `Path` vs `DynamicPath` with the `Pathish` protocol workaround is an honest admission that the API has an awkward seam — you will hit it. `ls()` silently logging a warning instead of throwing on permission errors is acknowledged as a bad call right in the README but never fixed. Carthage support is marked as blocked on a PR from who knows when.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →