[flutter_tools] add error handling wrapping for File.createSync (#73890)

This commit is contained in:
Jonah Williams
2021-01-13 14:25:37 -08:00
committed by GitHub
parent 1eb0bb52e1
commit abb48f495b
2 changed files with 19 additions and 0 deletions

View File

@@ -263,6 +263,17 @@ class ErrorHandlingFile
);
}
@override
void createSync({bool recursive = false}) {
_runSync<void>(
() => delegate.createSync(
recursive: recursive,
),
platform: _platform,
failureMessage: 'Flutter failed to create file at "${delegate.path}"',
);
}
@override
RandomAccessFile openSync({FileMode mode = FileMode.read}) {
return _runSync<RandomAccessFile>(