finds.dev← search

// the find

JohnSundell/Files

★ 2,634 · Swift · MIT · updated May 2025

A nicer way to handle files & folders in Swift

Files is a thin Swift wrapper around FileManager that gives you an object-oriented API for files and folders. It's aimed at Swift scripting and CLI tooling — the kind of thing you'd use instead of shelling out to bash. Single-file implementation, so dropping it into a project is trivial.

The API surface is genuinely pleasant: typed File and Folder objects, recursive iteration, and move/copy operations that don't require you to construct URL strings manually. Single-file distribution is pragmatic for scripting contexts where adding a full SPM dependency feels heavy. Error handling via Swift's native try/catch is the right call — no weird callback patterns or optional chaining through every operation. The 'system folders' shortcuts (Folder.home, Folder.temporary, etc.) are the kind of small ergonomic win that saves real time in scripts.

It's essentially unmaintained — the CI badge points to BuddyBuild, a service that shut down in 2019, which tells you how long it's been since anyone seriously tended to this. No async/await support anywhere, so integrating with modern Swift concurrency requires wrapping it yourself. The abstraction is shallow enough that you'll hit FileManager directly for anything beyond basic read/write/move — file attributes, extended attributes, watching for changes. With only 2600 stars after years on GitHub, the community around it is small, so when you hit an edge case you're mostly on your own.

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 →