file
A pluggable, mockable file system abstraction for Dart. Supports local file system access, as well as in-memory file systems, record-replay file systems, and chroot file systems.
7.0.1
9.5M downloads/mo
#32 most downloaded on pub.dev
dart-lang/tools
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.4 years
Nearly every release is documented
notes for 41 of 42 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
47 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
47 releases · Jun 2015 to Oct 2024Releases
latest 47-
7.0.108 Oct 2024Release notes
Open source →- Update the pubspec repository field to reflect the new package repository.
-
7.0.019 May 2023Release notes
Open source →- Dart 3 fixes for class modifiers.
- Require Dart 3.0.
MemoryFileSystemnow treats empty paths as non-existent.- Fix
FileSystem.isLink/FileSystem.isLinkSyncto not follow symbolic links. - Make the return type of
MemoryFile.openReadand_ChrootFile.openReadagain match the return type fromdart:io.
-
6.1.418 Aug 2022 -
6.1.317 Aug 2022Release notes
Open source →- In classes that implement
Filemethodscreate,createSyncnow takebool exclusive = trueparameter. No functional changes.
- In classes that implement
-
6.1.215 Jun 2021 -
6.1.117 May 2021 -
6.1.018 Feb 2021Release notes
Open source →- Reading invalid UTF8 with the
MemoryFileSystemnow correctly throws aFileSystemExceptioninstead of aFormatError. MemoryFileSystemnow provides anopHandleto inspect read/write operations.MemoryFileSystemnow creates the temporary directory before returning increateTemp/createTempSync.
- Reading invalid UTF8 with the
-
6.0.117 Feb 2021Release notes
Open source →- Fix sound type error in memory backend when reading non-existent
MemoryDirectory.
- Fix sound type error in memory backend when reading non-existent
-
6.0.003 Feb 2021 -
6.0.0-nullsafety.404 Nov 2020 pre-release -
6.0.0-nullsafety.322 Oct 2020 pre-release -
6.0.0-nullsafety.222 Sep 2020 pre-releaseRelease notes
Open source →- Make
ForwardingFile.openRead's return type again match the return type fromdart:io. - Remove some unnecessary
Uint8Listconversions inForwardingFile.
- Make
-
6.0.0-nullsafety.111 Aug 2020 pre-releaseRelease notes
Open source →- Update to null safety.
- Remove record/replay functionality.
- Made
MemoryRandomAccessFileandMemoryFile.openWritehandle the file being removed or renamed while open. - Fixed incorrect formatting in
NoMatchingInvocationError.toString(). - Fixed more test flakiness.
- Enabled more tests.
- Internal cleanup.
- Remove implicit dynamic in preparation for null safety.
- Remove dependency on Intl.
-
5.2.123 Jun 2020Release notes
Open source →- systemTemp directories created by
MemoryFileSystemwill allot names based on the file system instance instead of globally. MemoryFile.readAsLines()/readAsLinesSync()no longer treat a final newline in the file as the start of a new, empty line.RecordingFile.readAsLine()/readAsLinesSync()now always record a final newline.MemoryFile.flush()now returnsFuture<void>instead ofFuture<dynamic>.- Fixed some test flakiness.
- Enabled more tests.
- Internal cleanup.
- systemTemp directories created by
-
5.2.015 Jun 2020Release notes
Open source →- Added a
MemoryRandomAccessFileclass and implementedMemoryFile.open()/openSync().
- Added a
-
5.1.011 Oct 2019 -
5.0.1031 Aug 2019 -
5.0.931 Aug 2019 -
5.0.820 May 2019 -
5.0.8+125 Jun 2019Nothing published for this version
-
5.0.707 Dec 2018 -
5.0.630 Aug 2018 -
5.0.529 Aug 2018 -
5.0.414 Aug 2018Release notes
Open source →- Update SDK constraint to 2.0.0-dev.67.0, remove workaround in recording_proxy_mixin.dart.
- Fix usage within Dart 2 runtime mode in Dart 2.0.0-dev.61.0 and later.
- Relax constraints on
package:test
-
5.0.313 Aug 2018 -
5.0.213 Aug 2018 -
5.0.121 May 2018 -
5.0.010 Apr 2018Release notes
Open source →- Moved
testinglibrary into a dedicatedpackage:file_testingso that libraries don't need to take on a transitive dependency onpackage:testin order to usepackage:file.
- Moved
-
4.0.110 Apr 2018Release notes
Open source →- General library cleanup
- Add
stylesupport inMemoryFileSystem, so that callers can choose to have a memory file system with windows-like paths. [#68] (https://github.com/google/file.dart/issues/68)
-
4.0.006 Apr 2018Release notes
Open source →- Change method signature for
RecordingRandomAccessFile._closeto return aFuture<void>instead ofFuture<RandomAccessFile>. This follows a change in dart:io, Dart SDK2.0.0-dev.40.
- Change method signature for
-
3.0.020 Mar 2018Release notes
Open source →- Adds discovery API to find both a configuration and its location:
findPackageConfigAndFileandfindPackageConfigAndUri. - Removes support for the
.packagesfile.
The Dart SDK no longer supports that file, and no new.packagesfiles
will be generated.
Since the SDK requirement for this package is above 3.0.0,
no supporting SDK can use or generate.packages. - Simplifies API that no longer needs to support two separate files.
- Renamed
readAnyConfigFiletoreadConfigFile, and removed
thepreferNewestparameter. - Same for
readAnyConfigFileUriwhich becomesreadConfigFileUri. - Old functions still exists as deprecated, forwarding to the new
functions without thepreferNewestargument.
MakesPackageConfig,PackageandLanguageVersion@sealedclasses,
in preparation for making themfinalin a future update.
- Renamed
- Adds
PackageConfig.minVersionto complement.maxVersion.
Currently both are2.
Release notes
Open source →- Import
dart:iounconditionally. More recent Dart SDK revisions allowdart:ioto be imported in a browser context, though if methods are actually invoked, they will fail. This matches well withpackage:file, where users can use thememorylibrary and get in-memory implementations of thedart:iointerfaces. - Bump minimum Dart SDK to
1.24.0
- Adds discovery API to find both a configuration and its location:
-
2.3.701 Mar 2018 -
2.3.612 Feb 2018Release notes
Open source →- Relax sdk upper bound constraint to '<2.0.0' to allow 'edge' dart sdk use.
-
2.3.522 Nov 2017 -
2.3.413 Jul 2017 -
2.3.311 Jul 2017 -
2.3.227 Mar 2017Release notes
Open source →- Fixed
FileSystem.directory(Uri),FileSystem.file(Uri), andFileSystem.link(Uri)to consult the file system's path context when converting the URI to a file path rather than usingUri.toFilePath().
- Fixed
-
2.3.115 Mar 2017Release notes
Open source →- Fixed
MemoryFileSystemto makeFile.writeAs...()update the last modified time of the file.
- Fixed
-
2.3.027 Feb 2017Release notes
Open source →- Added the following convenience methods in
Directory:Directory.childDirectory(String basename)Directory.childFile(String basename)Directory.childLink(String basename)
- Added the following convenience methods in
-
2.2.022 Feb 2017 -
2.1.021 Feb 2017 -
2.0.112 Feb 2017 -
2.0.012 Feb 2017Release notes
Open source →- Improved
toStringimplementations in file system entity classes - Added
ForwardingFileSystemand associated forwarding classes to the mainfilelibrary - Removed
FileSystem.pathSeparator, and added a more comprehensiveFileSystem.pathproperty - Added
FileSystemEntity.basenameandFileSystemEntity.dirname - Added the
record_replaylibrary - Added the
testinglibrary
- Improved
-
1.0.107 Jan 2017Release notes
Open source →- Added
FileSystem.systemTempDirectory - Added the ability to pass
UriandFileSystemEntitytypes toFileSystem.directory(),FileSystem.file(), andFileSystem.link() - Added
FileSystem.pathSeparator
- Added
-
1.0.006 Jan 2017Release notes
Open source →- Unified interface to match dart:io API
- Local file system implementation
- In-memory file system implementation
- Chroot file system implementation
-
0.1.020 Feb 2016 -
0.0.1-dev+106 Jun 2015 pre-releaseNothing published for this version