# JohnSundell/Files

A nicer way to handle files & folders in Swift

Repository: https://github.com/JohnSundell/Files
Canonical: https://ross.abutalabs.com/products/johnsundell-files
Language: Swift
License: MIT
License Family: permissive
Topics: files, folders, swift, script, swift-script, xcode
Last push: 2025-05-30T11:22:15+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 24, release rhythm 8, longevity 100
- inputs: {"age_days": 3517, "days_push": 460, "days_rel": 460, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2637, forks 198 (observed 2026-08-28T04:07:06.320875+00:00)

## What it is
Files is a compact Swift library offering a modern, object-oriented API for reading, writing, and managing files and folders, wrapping Foundation's FileManager. It is aimed primarily at Swift scripting and tooling but can also be embedded in apps.

## Use cases
- iterate over files in a folder in a swift script
- rename files in a folder programmatically
- recursively walk a folder tree in swift
- create, write, and delete files and folders
- move files between folders in a command line tool
- access system folders like home and documents in swift

## When to choose
- you write Swift scripts or command line tools that manipulate the file system
- you want a cleaner, object-oriented alternative to raw FileManager APIs
- you need unified do-try-catch error handling for file operations

## When to avoid
- you need advanced file system features like watching, permissions, or streaming I/O
- your project is not written in Swift
- you need cross-language file handling outside the Apple/Linux Swift ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: file-system, developer-tools
- domain: developer-tools, files, cross-platform
- platform: -
- tags: swift-scripting, filemanager-wrapper, folders, macos, linux, ios, swift

## Member repositories
- JohnSundell/Files (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:06.320875+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:19:17.283800+00:00, confidence not recorded.
  - readme: https://github.com/JohnSundell/Files (fetched 2026-08-28T04:07:06.320875+00:00, sha 41b06bad2010)
- Data as of 2026-08-30T08:39:29.467469+00:00.
