better files: Towards a safe, sane I O library in Scala
summary
Better-files provides a thin wrapper around Java NIO that smooths corner cases (follow links, defaults for open options, codec handling), adds implicits for Java IO conversions, and returns sensible fluent types (move returns destination). It implements self-closing iterators, a faster Scanner (about 5–6× faster than Java's regex-based Scanner), a ZIP/unzip tool and a robust file watcher with an actor-based layer built on top; core is ~450 lines of code with ~3,000 lines of tests and claims near 100% coverage.
AI-written summary · about
chapters (8)
- 0:00Start
- 2:51Appending to a file
- 5:47Copying Files Directories
- 7:15Scala Solutions
- 13:12Scala - A Melting Pot of Ideas
- 16:06Completely Opinionated Design Goals
- 36:11Signalling Intent via Literal Types
- 37:24Automatic Resource Management
related talks
42mEfficient File Handling for Java Developers
45mEffective Scala
10mScalaF: Functional Refactoring Suggestions for Scala
49mScala best practices I wish someone'd told me about
52mThe Virtual Filesystem This Changes Everything
46mSystematically handling errors in your code to make them useful
48mJava's Hidden Gems: Tools and Libraries
49mWhat's New in Scala
