Towards a safe, sane I O library in Scala
summary
A new Scala library called better-files wraps Java NIO with no external dependencies and implements safe defaults, automatic resource management (self-closing iterators and autoclose implicits), and a single File class with rich ops for copy/move/zip/permissions and pattern-matched file types. Benchmarks show the scanner is 8x faster than java.util.Scanner. It adds both a thread-backed file watcher and an Akka-based reactive watcher, ships with tests and CI, sits at about 3,000 lines of code, and is used in production.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:30filesystem IO
- 4:26Java IO
- 5:45Copying directories
- 6:33Solutions
- 9:47Scala Libraries
- 13:35Ideal IO Library
- 28:15Java baggage
- 29:10implicit conversions
- 29:57pattern matching
- 31:23globbing
- 31:52file system operations
- 32:50commands
- 33:20attributes
- 35:06link
- 36:16file comparison
- 36:49custom ordering
- 37:24zip
- 38:14resource management
- 39:56scanner
- 41:31while monitoring
- 42:32custom events
- 42:52abstraction
- 44:06default library
- 44:51source
- 45:31QA
related talks
42mEfficient File Handling for Java Developers
51mWhat went wrong with AIO
21mScala(ble) High-Performance Computing
45mImplementing the Active Slick
01h 06mIO in PostgreSQL: Past, Present, Future
36mData pipelines engineering made simple with Scala
48mThe path to using AIO in postgres
57mBig Data Pipelines With Scala - Part 2 of 2
