better-files follows the following MAJOR.MINOR.PATCH
release conventions:
- Changes in
PATCH
version:- Minor functionality changes (usually bug fixes)
- No breaking public API changes
- New APIs might be added
- Change in
MINOR
version:- In addition to
PATCH
changes - Minor API shape changes e.g. renaming, deprecations
- Trivial to modify code to address compilation issues
- In addition to
- Change in
MAJOR
version:- In addition to
MINOR
changes - Significant structural and API changes
- In addition to
- (Planned) Issue #589: Methods that do I/O has parens
()
- Migration Guide: Some APIs need extra parens e.g.
file.size
is nowfile.size()
anddir.list
is nowdir.list()
- Migration Guide: Some APIs need extra parens e.g.
- PR #584: Remove implicit options from all APIs.
- Migration Guide: Instead of implicit params like
implicit charset: Charset
, it is now explicitly passed in:// Before def appendText(text: String)(implicit charset: Charset = DefaultCharset) // Now def appendText(text: String, charset: Charset = DefaultCharset)
- Migration Guide: Instead of implicit params like
- Issue #295:
CloseableIterators
fixes resource leaks on partial iterations (#270, #403, #553)- Migration Guide
val lines: Iterator[String] = file.lines() // This will auto close the underlying stream on iterator exhaustion lines.find(_ == "hello world") //This will auto close the stream if nothing is found OR if the item is found lines.take(10).size //This will close the stream even if stream has >10 lines // BEFORE: The above _partial_ operations would leave the stream open // NOW: The streams would be closed // If you still want the previous auto closing behaviour: lines.nonClosing().take(10).size // This would leave stream open if it has >10 lines
- Migration Guide
- (Planned) Issue #88: Path ASTs for relative vs. absolute path
- Issue #593: Remove compilation warnings for Scala 2.13 and Scala 3
- Issue #624: Fix zip-slip vulnerability
- (Planned) Issue #590:
file.walk()
can handle errors - (Planned) Issue #591: New APIs
- (Planned) Issue #3: Walk File Tree APIs
- (Planned) Issue #221:
linkTo
bug fix - (Planned) Issue #129: JSR-203 and JimFS compatibility
- (Planned) Issue #88: Strongly typed relative and absolute path APIs
- (Planned) Issue #204: Universal converter APIs
- PR #573: Scala 3 Support!
- PR #426: Add
UnicodeCharset.isValid()
- PR #428: Add
File.resourcePathAsString
- PR #436: Exclude destination zip file from final output
- PR #429: Add
URI
andURL
helpers - Issue #478: Handle broken symlinks in
size()
- Issue #412: Better error message when URI is not a valid file
- Issue #417: Fix
NoSuchMethodError
when readingcontentAsString
on JDK8
- Issue #326: Do not mark end of input when charset is detected from BOM
- Issue #332: Fix
setGroup
- it was using semantics ofsetOwner
- Checksum utils for streams
- Issue #316: Rename
isWriteable
toisWritable
- Issue #380: Zip API exception in JDK 11
- Issue #391: Handle NPE in
FileMonitor
for large folders - Issue #362: Add API to skip missing files when calculating size on a directory
- Issue #320: Change extension works when file is not present
- PR #312: Scala 2.13.0-RC1 release
- Issue #309: Recursive
deleteOnExit
support - Rename certain implicit utils
- Issue #283: Fix resource not closing bug on File#list
- Issue #279: Better manage open file handles in recursive deletion of large directories
- Issue #285: Add canonical file/path APIs
- PR #290 Add maxDepth to File#glob and File#globRegex
- Issue #248: Release for Scala 2.13.0-M5
- Issue #270:
FileTreeIterator
can be traversed multiple times safely - Issue #262: Handle backslashes in zip entry name
- Issue #278: Dispose multiple resources
- Util to fetch root Resource URL
using
util for disposable resources- file.lineCount util
- inputstream.byteArray util
- Issue #123: Rename ManagedResource to Dispose
- Issue #241: Remove resource leak from directory empty check
- Issue #242: Support for JDK 9 and JDK 10
- Remove Files alias
- List with filter API
- More createIfNotExists() APIs
- Issue #247: Strict equality for contains/isParentOf/isChildOf
- Issue #249: Make File serializable
- More ZIP I/O helpers
- More String to I/O helpers
- PR #230: New Resource APIs with module safety
- Issue #224: FileMonitor should not block threads
- PR #202: for-comprehension friendly ARM
- PR #203: Type-class for Scanner construction
- Remove redundant
count
param fromFile.Monitor#onUnknownEvent
- Issue #146: Release for Scala 2.11
- Issue #193: Handle fast changing directory watching on Windows
- Issue #195: Do not swallow
FileAlreadyExistsException
when creating directory or file - Add method to check verified file existence (or non-existence)
- Issue #198:
InputStreamOps#asString
doesn't close the stream on exception - PR #199: Utils for Object I/O
- PR #200: GZIP APIs
- Rename PosixFilePermissions.OTHERS* APIs
- Issue #186: Splitter based Scanner
- Issue #173: Better ARM handling of fatal errors
- Issue #182: Move and Copy into directory utils
- Issue #189: Util to read String from an InputStream
- Issue #187: Readers for
java.time.*
andjava.sql.*
- Restore File.usingTemp first introduced in 7c60ca
- Fix bug in appendBytes
- Issue #140: Batch up events for file monitoring
- Issue #136: Use execution contexts for file monitoring
- Issue #152: Streamed unzipping
- Issue #150:
ManagedResource[File]
for temp files - Issue #126: New Typeclassed approach to ARM
- Issue #160: Ability to convert Reader/Writer to Input/Output streams
- Issue #77: Better UNIX-y behaviour for
cp
andmv
DSL utils - Issue #169: Support for symbols in file DSL
- Issue #171: Handle
createDirectories()
on symlinks to existing directories
- Issue #9: File resource utils
- Issue #114: Glob with automatic path
- Issue #107: Handle Byte-order markers
- PR #113: File anchor util
- Issue #105: Remove dependency on scala.io
- File.usingTemp
- Optional symbolic operations
- PR #100: Fix issue in unzip of parents
- PR #101: Removed File.Type
- Issue #96: Teeing outputstreams
- File.testPermission
- File.nonEmpty
- Update metadata API
- Issue #80: Unzip filters
- PR #107: Java serialization utils
- PR #99: Release for Scala 2.12