dart-sdk/sdk
Jonas Termansen 5ae4448779 [dart:io] Provide epoch timestamps in the FileStat notFound object.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40706

The dummy object returned if FileStat.stat() and FileStat.statSync()
fail now contains Unix epoch timestamps instead of null for the
accessed, changed, and modified getters.

These timestamps are always non-null if the API succeeds and the
timestamps are meaningless when the API fails and returns the
FileSystemEntityType.notFound type. This change makes the timestamps
always non-null, which avoids all legitimate accesses needing a needless
null check when Dart becomes null safe. This change is consistent with
the mode and size getters that are initialized to non-null dummy values
when the API fail.

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: Iff6b34d04b60f4c9f4cf8d9dd0679f721d142ba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136585
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-11 13:39:13 +00:00
..
bin [vm] Remove deprecated (and untested) ARMv5 support from the VM 2019-10-23 14:44:33 +00:00
lib [dart:io] Provide epoch timestamps in the FileStat notFound object. 2020-03-11 13:39:13 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn Add dartdev as a pkg/ utility that should have a snapshot generated and added in the Dart SDK 2020-02-25 07:16:10 +00:00