Introduce stub of a exclusive parameter for File.create. (#199)

* Introduce stub of a exclusive parameter for File.create.

This is to soften landing of a breaking change https://github.com/dart-lang/sdk/issues/49647

* Fix format

* Fix deprecated member use

* Update pubspec.yaml, CHANGELOG.md
diff --git a/packages/file/CHANGELOG.md b/packages/file/CHANGELOG.md
index 61e6ae2..27d83ff 100644
--- a/packages/file/CHANGELOG.md
+++ b/packages/file/CHANGELOG.md
@@ -1,3 +1,7 @@
+#### 6.1.3
+
+* In classes that implement `File` methods `create`, `createSync` now take `bool exclusive = true` parameter. No functional changes.
+
 #### 6.1.2
 
 * `MemoryFileSystem` now provides `opHandle`s for exists operations.
diff --git a/packages/file/lib/src/backends/chroot/chroot_file.dart b/packages/file/lib/src/backends/chroot/chroot_file.dart
index aabe24f..ed340d6 100644
--- a/packages/file/lib/src/backends/chroot/chroot_file.dart
+++ b/packages/file/lib/src/backends/chroot/chroot_file.dart
@@ -125,7 +125,7 @@
   File get absolute => _ChrootFile(fileSystem, _absolutePath);
 
   @override
-  Future<File> create({bool recursive = false}) async {
+  Future<File> create({bool recursive = false, bool exclusive = false}) async {
     String path = fileSystem._resolve(
       this.path,
       followLinks: false,
@@ -157,7 +157,7 @@
   }
 
   @override
-  void createSync({bool recursive = false}) {
+  void createSync({bool recursive = false, bool exclusive = false}) {
     String path = fileSystem._resolve(
       this.path,
       followLinks: false,
diff --git a/packages/file/lib/src/backends/memory/memory_file.dart b/packages/file/lib/src/backends/memory/memory_file.dart
index be3cadc..22b0ca0 100644
--- a/packages/file/lib/src/backends/memory/memory_file.dart
+++ b/packages/file/lib/src/backends/memory/memory_file.dart
@@ -48,15 +48,16 @@
   }
 
   @override
-  Future<File> create({bool recursive = false}) async {
-    createSync(recursive: recursive);
+  Future<File> create({bool recursive = false, bool exclusive = false}) async {
+    createSync(recursive: recursive, exclusive: exclusive);
     return this;
   }
 
+  // TODO(dartbug.com/49647): Pass `exclusive` through after it lands.
   @override
-  void createSync({bool recursive = false}) {
+  void createSync({bool recursive = false, bool exclusive = false}) {
     fileSystem.opHandle(path, FileSystemOp.create);
-    _doCreate(recursive: recursive);
+    _doCreate(recursive: recursive /*, exclusive: exclusive*/);
   }
 
   Node? _doCreate({bool recursive = false}) {
diff --git a/packages/file/lib/src/forwarding/forwarding_file.dart b/packages/file/lib/src/forwarding/forwarding_file.dart
index 3a8c795..d81bab4 100644
--- a/packages/file/lib/src/forwarding/forwarding_file.dart
+++ b/packages/file/lib/src/forwarding/forwarding_file.dart
@@ -14,13 +14,16 @@
   @override
   ForwardingFile wrap(io.File delegate) => wrapFile(delegate) as ForwardingFile;
 
+  // TODO(dartbug.com/49647): Pass `exclusive` through after it lands.
   @override
-  Future<File> create({bool recursive = false}) async =>
-      wrap(await delegate.create(recursive: recursive));
+  Future<File> create({bool recursive = false, bool exclusive = false}) async =>
+      wrap(await delegate.create(
+          recursive: recursive /*, exclusive: exclusive*/));
 
+  // TODO(dartbug.com/49647): Pass `exclusive` through after it lands.
   @override
-  void createSync({bool recursive = false}) =>
-      delegate.createSync(recursive: recursive);
+  void createSync({bool recursive = false, bool exclusive = false}) =>
+      delegate.createSync(recursive: recursive /*, exclusive: exclusive*/);
 
   @override
   Future<File> copy(String newPath) async => wrap(await delegate.copy(newPath));
diff --git a/packages/file/lib/src/interface/file.dart b/packages/file/lib/src/interface/file.dart
index d4267e4..87417c6 100644
--- a/packages/file/lib/src/interface/file.dart
+++ b/packages/file/lib/src/interface/file.dart
@@ -12,7 +12,7 @@
 abstract class File implements FileSystemEntity, io.File {
   // Override method definitions to codify the return type covariance.
   @override
-  Future<File> create({bool recursive = false});
+  Future<File> create({bool recursive = false, bool exclusive = false});
 
   @override
   Future<File> rename(String newPath);
diff --git a/packages/file/lib/src/interface/file_system.dart b/packages/file/lib/src/interface/file_system.dart
index 79ef6b8..da898a3 100644
--- a/packages/file/lib/src/interface/file_system.dart
+++ b/packages/file/lib/src/interface/file_system.dart
@@ -105,7 +105,7 @@
   /// `false`, and [path] points to a link
   ///
   /// If the [path] does not point to a file system object or an error occurs
-  /// then [io.FileSystemEntityType.NOT_FOUND] is returned.
+  /// then [io.FileSystemEntityType.notFound] is returned.
   Future<io.FileSystemEntityType> type(String path, {bool followLinks = true});
 
   /// Syncronously finds the type of file system object that a [path] points
@@ -115,7 +115,7 @@
   /// `false`, and [path] points to a link
   ///
   /// If the [path] does not point to a file system object or an error occurs
-  /// then [io.FileSystemEntityType.NOT_FOUND] is returned.
+  /// then [io.FileSystemEntityType.notFound] is returned.
   io.FileSystemEntityType typeSync(String path, {bool followLinks = true});
 
   /// Checks if [`type(path)`](type) returns [io.FileSystemEntityType.FILE].
diff --git a/packages/file/pubspec.yaml b/packages/file/pubspec.yaml
index f6d82de..8810187 100644
--- a/packages/file/pubspec.yaml
+++ b/packages/file/pubspec.yaml
@@ -1,5 +1,5 @@
 name: file
-version: 6.1.2
+version: 6.1.3
 description:
   A pluggable, mockable file system abstraction for Dart. Supports local file
   system access, as well as in-memory file systems, record-replay file systems,