How kylef/pathkit works
PathKit is a small Swift library for representing filesystem paths and performing path-related operations. A caller creates or combines a Path, then uses it to inspect or transform paths, perform filesystem changes, read or write contents, or traverse and glob paths. The sampled source shows Foundation-backed filesystem operations and POSIX glob support; unsampled implementations are represented only where the README documents the capability.
Main entry points: PathKit.swift Path inspection
Components 10
Other components
- Library caller
- Path values
Sources/PathKit.swift - Path transformations
Sources/PathKit.swift - Path inspection
Sources/PathKit.swift - Filesystem operations
Sources/PathKit.swift - Content I/O
Sources/PathKit.swift - Traversal and glob
Sources/PathKit.swift - Foundation APIs
- Local filesystem
- POSIX glob
Connections 15
- Library caller → Path values: creates and combines
- Library caller → Path transformations: requests transforms
- Library caller → Path inspection: queries paths
- Library caller → Filesystem operations: requests changes
- Library caller → Content I/O: reads or writes
- Library caller → Traversal and glob: traverses or matches
- Path transformations → Foundation APIs: standardizes paths
- Path inspection → Foundation APIs: checks path metadata
- Filesystem operations → Foundation APIs: creates moves deletes
- Content I/O → Foundation APIs: reads and writes
- Traversal and glob → Foundation APIs: enumerates directories
- Path inspection → Local filesystem: checks existence and type
- Filesystem operations → Local filesystem: changes entries
- Content I/O → Local filesystem: transfers contents
- Traversal and glob → POSIX glob: matches glob patterns