Import dart:io directly (#77)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 161ef5d..268adc9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+#### 3.0.0
+
+* Import `dart:io` unconditionally. More recent Dart SDK revisions allow
+ `dart:io` to be imported in a browser context, though if methods are actually
+ invoked, they will fail. This matches well with `package:file`, where users
+ can use the `memory` library and get in-memory implementations of the
+ `dart:io` interfaces.
+* Bump minimum Dart SDK to `1.24.0`
+
#### 2.3.7
* Fix Dart 2 error.
diff --git a/lib/src/backends/local.dart b/lib/src/backends/local.dart
index b5ef405..b67dd1f 100644
--- a/lib/src/backends/local.dart
+++ b/lib/src/backends/local.dart
@@ -12,8 +12,6 @@
import 'package:file/file.dart';
import 'package:path/path.dart' as p;
-import '../io/shim.dart' as shim;
-
part 'local/local_directory.dart';
part 'local/local_file.dart';
part 'local/local_file_system.dart';
diff --git a/lib/src/backends/local/local_file_system.dart b/lib/src/backends/local/local_file_system.dart
index cca5364..b26d107 100644
--- a/lib/src/backends/local/local_file_system.dart
+++ b/lib/src/backends/local/local_file_system.dart
@@ -14,13 +14,13 @@
@override
Directory directory(dynamic path) =>
- new _LocalDirectory(this, shim.newDirectory(getPath(path)));
+ new _LocalDirectory(this, new io.Directory(getPath(path)));
@override
- File file(dynamic path) => new _LocalFile(this, shim.newFile(getPath(path)));
+ File file(dynamic path) => new _LocalFile(this, new io.File(getPath(path)));
@override
- Link link(dynamic path) => new _LocalLink(this, shim.newLink(getPath(path)));
+ Link link(dynamic path) => new _LocalLink(this, new io.Link(getPath(path)));
@override
p.Context get path => new p.Context();
@@ -30,36 +30,36 @@
/// platform-dependent, and may be set by an environment variable.
@override
Directory get systemTempDirectory =>
- new _LocalDirectory(this, shim.systemTemp());
+ new _LocalDirectory(this, io.Directory.systemTemp);
@override
- Directory get currentDirectory => directory(shim.currentDirectory.path);
+ Directory get currentDirectory => directory(io.Directory.current.path);
@override
- set currentDirectory(dynamic path) => shim.currentDirectory = path;
+ set currentDirectory(dynamic path) => io.Directory.current = path;
@override
- Future<io.FileStat> stat(String path) => shim.stat(path);
+ Future<io.FileStat> stat(String path) => io.FileStat.stat(path);
@override
- io.FileStat statSync(String path) => shim.statSync(path);
+ io.FileStat statSync(String path) => io.FileStat.statSync(path);
@override
Future<bool> identical(String path1, String path2) =>
- shim.identical(path1, path2);
+ io.FileSystemEntity.identical(path1, path2);
@override
bool identicalSync(String path1, String path2) =>
- shim.identicalSync(path1, path2);
+ io.FileSystemEntity.identicalSync(path1, path2);
@override
- bool get isWatchSupported => shim.isWatchSupported;
+ bool get isWatchSupported => io.FileSystemEntity.isWatchSupported;
@override
Future<io.FileSystemEntityType> type(String path, {bool followLinks: true}) =>
- shim.type(path, followLinks);
+ io.FileSystemEntity.type(path, followLinks: followLinks);
@override
io.FileSystemEntityType typeSync(String path, {bool followLinks: true}) =>
- shim.typeSync(path, followLinks);
+ io.FileSystemEntity.typeSync(path, followLinks: followLinks);
}
diff --git a/lib/src/io.dart b/lib/src/io.dart
index bd430a4..9d57e78 100644
--- a/lib/src/io.dart
+++ b/lib/src/io.dart
@@ -8,10 +8,7 @@
/// the `file` package. The `file` package re-exports these interfaces (or in
/// some cases, implementations of these interfaces by the same name), so this
/// file need not be exposes publicly and exists for internal use only.
-///
-/// For VM users, this exports the actual `dart:io` interfaces; for browser
-/// contexts, this exports locally-defined versions of those same interfaces.
-export 'io/interface.dart' if (dart.library.io) 'dart:io'
+export 'dart:io'
show
Directory,
File,
diff --git a/lib/src/io/interface.dart b/lib/src/io/interface.dart
deleted file mode 100644
index 78bb899..0000000
--- a/lib/src/io/interface.dart
+++ /dev/null
@@ -1,553 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:convert';
-
-// ignore: public_member_api_docs
-abstract class Directory implements FileSystemEntity {
- // ignore: public_member_api_docs
- Future<Directory> create({bool recursive: false});
-
- // ignore: public_member_api_docs
- void createSync({bool recursive: false});
-
- // ignore: public_member_api_docs
- Future<Directory> createTemp([String prefix]);
-
- // ignore: public_member_api_docs
- Directory createTempSync([String prefix]);
-
- @override
- Future<Directory> rename(String newPath);
-
- @override
- Directory renameSync(String newPath);
-
- @override
- Directory get absolute;
-
- // ignore: public_member_api_docs
- Stream<FileSystemEntity> list(
- {bool recursive: false, bool followLinks: true});
-
- // ignore: public_member_api_docs
- List<FileSystemEntity> listSync(
- {bool recursive: false, bool followLinks: true});
-}
-
-// ignore: public_member_api_docs
-abstract class File implements FileSystemEntity {
- // ignore: public_member_api_docs
- Future<File> create({bool recursive: false});
-
- // ignore: public_member_api_docs
- void createSync({bool recursive: false});
-
- @override
- Future<File> rename(String newPath);
-
- @override
- File renameSync(String newPath);
-
- // ignore: public_member_api_docs
- Future<File> copy(String newPath);
-
- // ignore: public_member_api_docs
- File copySync(String newPath);
-
- // ignore: public_member_api_docs
- Future<int> length();
-
- // ignore: public_member_api_docs
- int lengthSync();
-
- @override
- File get absolute;
-
- // ignore: public_member_api_docs
- Future<DateTime> lastAccessed();
-
- // ignore: public_member_api_docs
- DateTime lastAccessedSync();
-
- // ignore: public_member_api_docs
- Future<dynamic> setLastAccessed(DateTime time);
-
- // ignore: public_member_api_docs
- void setLastAccessedSync(DateTime time);
-
- // ignore: public_member_api_docs
- Future<DateTime> lastModified();
-
- // ignore: public_member_api_docs
- DateTime lastModifiedSync();
-
- // ignore: public_member_api_docs
- Future<dynamic> setLastModified(DateTime time);
-
- // ignore: public_member_api_docs
- void setLastModifiedSync(DateTime time);
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> open({FileMode mode: FileMode.READ});
-
- // ignore: public_member_api_docs
- RandomAccessFile openSync({FileMode mode: FileMode.READ});
-
- // ignore: public_member_api_docs
- Stream<List<int>> openRead([int start, int end]);
-
- // ignore: public_member_api_docs
- IOSink openWrite({FileMode mode: FileMode.WRITE, Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- Future<List<int>> readAsBytes();
-
- // ignore: public_member_api_docs
- List<int> readAsBytesSync();
-
- // ignore: public_member_api_docs
- Future<String> readAsString({Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- String readAsStringSync({Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- Future<List<String>> readAsLines({Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- List<String> readAsLinesSync({Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- Future<File> writeAsBytes(List<int> bytes,
- {FileMode mode: FileMode.WRITE, bool flush: false});
-
- // ignore: public_member_api_docs
- void writeAsBytesSync(List<int> bytes,
- {FileMode mode: FileMode.WRITE, bool flush: false});
-
- // ignore: public_member_api_docs
- Future<File> writeAsString(String contents,
- {FileMode mode: FileMode.WRITE,
- Encoding encoding: UTF8,
- bool flush: false});
-
- // ignore: public_member_api_docs
- void writeAsStringSync(String contents,
- {FileMode mode: FileMode.WRITE,
- Encoding encoding: UTF8,
- bool flush: false});
-}
-
-// ignore: public_member_api_docs
-enum FileLock {
- // ignore: constant_identifier_names, public_member_api_docs
- SHARED,
-
- // ignore: constant_identifier_names, public_member_api_docs
- EXCLUSIVE,
-
- // ignore: constant_identifier_names, public_member_api_docs
- BLOCKING_SHARED,
-
- // ignore: constant_identifier_names, public_member_api_docs
- BLOCKING_EXCLUSIVE,
-}
-
-// ignore: public_member_api_docs
-class FileMode {
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileMode READ = const FileMode._internal(0);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileMode WRITE = const FileMode._internal(1);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileMode APPEND = const FileMode._internal(2);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileMode WRITE_ONLY = const FileMode._internal(3);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileMode WRITE_ONLY_APPEND = const FileMode._internal(4);
-
- final int _mode; // ignore: unused_field
-
- const FileMode._internal(this._mode);
-}
-
-// ignore: public_member_api_docs
-abstract class FileStat {
- // ignore: public_member_api_docs
- DateTime get changed;
-
- // ignore: public_member_api_docs
- DateTime get modified;
-
- // ignore: public_member_api_docs
- DateTime get accessed;
-
- // ignore: public_member_api_docs
- FileSystemEntityType get type;
-
- // ignore: public_member_api_docs
- int get mode;
-
- // ignore: public_member_api_docs
- int get size;
-
- // ignore: public_member_api_docs
- String modeString();
-}
-
-// ignore: public_member_api_docs
-abstract class FileSystemEntity {
- // ignore: public_member_api_docs
- String get path;
-
- // ignore: public_member_api_docs
- Uri get uri;
-
- // ignore: public_member_api_docs
- Future<bool> exists();
-
- // ignore: public_member_api_docs
- bool existsSync();
-
- // ignore: public_member_api_docs
- Future<FileSystemEntity> rename(String newPath);
-
- // ignore: public_member_api_docs
- FileSystemEntity renameSync(String newPath);
-
- // ignore: public_member_api_docs
- Future<String> resolveSymbolicLinks();
-
- // ignore: public_member_api_docs
- String resolveSymbolicLinksSync();
-
- // ignore: public_member_api_docs
- Future<FileStat> stat();
-
- // ignore: public_member_api_docs
- FileStat statSync();
-
- // ignore: public_member_api_docs
- Future<FileSystemEntity> delete({bool recursive: false});
-
- // ignore: public_member_api_docs
- void deleteSync({bool recursive: false});
-
- // ignore: public_member_api_docs
- Stream<FileSystemEvent> watch(
- {int events: FileSystemEvent.ALL, bool recursive: false});
-
- // ignore: public_member_api_docs
- bool get isAbsolute;
-
- // ignore: public_member_api_docs
- FileSystemEntity get absolute;
-
- // ignore: public_member_api_docs
- Directory get parent;
-}
-
-// ignore: public_member_api_docs
-class FileSystemEntityType {
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileSystemEntityType FILE =
- const FileSystemEntityType._internal(0);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileSystemEntityType DIRECTORY =
- const FileSystemEntityType._internal(1);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileSystemEntityType LINK =
- const FileSystemEntityType._internal(2);
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const FileSystemEntityType NOT_FOUND =
- const FileSystemEntityType._internal(3);
-
- final int _type;
- const FileSystemEntityType._internal(this._type);
-
- // ignore: public_member_api_docs
- @override
- String toString() =>
- const <String>['FILE', 'DIRECTORY', 'LINK', 'NOT_FOUND'][_type];
-}
-
-// ignore: public_member_api_docs
-abstract class FileSystemEvent {
- // ignore: constant_identifier_names, public_member_api_docs
- static const int CREATE = 1 << 0;
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const int MODIFY = 1 << 1;
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const int DELETE = 1 << 2;
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const int MOVE = 1 << 3;
-
- // ignore: constant_identifier_names, public_member_api_docs
- static const int ALL = CREATE | MODIFY | DELETE | MOVE;
-
- // ignore: public_member_api_docs
- int get type;
-
- // ignore: public_member_api_docs
- String get path;
-
- // ignore: public_member_api_docs
- bool get isDirectory;
-}
-
-// ignore: public_member_api_docs
-class FileSystemException implements IOException {
- // ignore: public_member_api_docs
- const FileSystemException([this.message = "", this.path = "", this.osError]);
-
- // ignore: public_member_api_docs
- final String message;
-
- // ignore: public_member_api_docs
- final String path;
-
- // ignore: public_member_api_docs
- final OSError osError;
-
- // ignore: public_member_api_docs
- @override
- String toString() {
- StringBuffer sb = new StringBuffer();
- sb.write("FileSystemException");
- if (message.isNotEmpty) {
- sb.write(": $message");
- if (path != null) {
- sb.write(", path = '$path'");
- }
- if (osError != null) {
- sb.write(" ($osError)");
- }
- } else if (osError != null) {
- sb.write(": $osError");
- if (path != null) {
- sb.write(", path = '$path'");
- }
- } else if (path != null) {
- sb.write(": $path");
- }
- return sb.toString();
- }
-}
-
-// ignore: public_member_api_docs
-abstract class IOException implements Exception {}
-
-// ignore: public_member_api_docs
-abstract class IOSink implements StreamSink<List<int>>, StringSink {
- // ignore: public_member_api_docs
- Encoding encoding;
-
- // ignore: public_member_api_docs
- @override
- void add(List<int> data);
-
- // ignore: public_member_api_docs
- @override
- void write(Object obj);
-
- // ignore: public_member_api_docs
- @override
- void writeAll(Iterable<dynamic> objects, [String separator = ""]);
-
- // ignore: public_member_api_docs
- @override
- void writeln([Object obj = ""]);
-
- // ignore: public_member_api_docs
- @override
- void writeCharCode(int charCode);
-
- // ignore: public_member_api_docs
- @override
- void addError(dynamic error, [StackTrace stackTrace]);
-
- // ignore: public_member_api_docs
- @override
- Future<dynamic> addStream(Stream<List<int>> stream);
-
- // ignore: public_member_api_docs
- Future<dynamic> flush();
-
- // ignore: public_member_api_docs
- @override
- Future<dynamic> close();
-
- // ignore: public_member_api_docs
- @override
- Future<dynamic> get done;
-}
-
-// ignore: public_member_api_docs
-abstract class Link implements FileSystemEntity {
- // ignore: public_member_api_docs
- Future<Link> create(String target, {bool recursive: false});
-
- // ignore: public_member_api_docs
- void createSync(String target, {bool recursive: false});
-
- // ignore: public_member_api_docs
- void updateSync(String target);
-
- // ignore: public_member_api_docs
- Future<Link> update(String target);
-
- // ignore: public_member_api_docs
- @override
- Future<Link> rename(String newPath);
-
- // ignore: public_member_api_docs
- @override
- Link renameSync(String newPath);
-
- // ignore: public_member_api_docs
- @override
- Link get absolute;
-
- // ignore: public_member_api_docs
- Future<String> target();
-
- // ignore: public_member_api_docs
- String targetSync();
-}
-
-// ignore: public_member_api_docs
-class OSError {
- // ignore: public_member_api_docs
- static const int noErrorCode = -1;
-
- // ignore: public_member_api_docs
- const OSError([this.message = "", this.errorCode = noErrorCode]);
-
- // ignore: public_member_api_docs
- final String message;
-
- // ignore: public_member_api_docs
- final int errorCode;
-
- @override
- String toString() {
- StringBuffer sb = new StringBuffer();
- sb.write("OS Error");
- if (message.isNotEmpty) {
- sb..write(": ")..write(message);
- if (errorCode != noErrorCode) {
- sb..write(", errno = ")..write(errorCode.toString());
- }
- } else if (errorCode != noErrorCode) {
- sb..write(": errno = ")..write(errorCode.toString());
- }
- return sb.toString();
- }
-}
-
-// ignore: public_member_api_docs
-abstract class RandomAccessFile {
- // ignore: public_member_api_docs
- Future<RandomAccessFile> close();
-
- // ignore: public_member_api_docs
- void closeSync();
-
- // ignore: public_member_api_docs
- Future<int> readByte();
-
- // ignore: public_member_api_docs
- int readByteSync();
-
- // ignore: public_member_api_docs
- Future<List<int>> read(int bytes);
-
- // ignore: public_member_api_docs
- List<int> readSync(int bytes);
-
- // ignore: public_member_api_docs
- Future<int> readInto(List<int> buffer, [int start = 0, int end]);
-
- // ignore: public_member_api_docs
- int readIntoSync(List<int> buffer, [int start = 0, int end]);
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> writeByte(int value);
-
- // ignore: public_member_api_docs
- int writeByteSync(int value);
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> writeFrom(List<int> buffer,
- [int start = 0, int end]);
-
- // ignore: public_member_api_docs
- void writeFromSync(List<int> buffer, [int start = 0, int end]);
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> writeString(String string,
- {Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- void writeStringSync(String string, {Encoding encoding: UTF8});
-
- // ignore: public_member_api_docs
- Future<int> position();
-
- // ignore: public_member_api_docs
- int positionSync();
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> setPosition(int position);
-
- // ignore: public_member_api_docs
- void setPositionSync(int position);
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> truncate(int length);
-
- // ignore: public_member_api_docs
- void truncateSync(int length);
-
- // ignore: public_member_api_docs
- Future<int> length();
-
- // ignore: public_member_api_docs
- int lengthSync();
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> flush();
-
- // ignore: public_member_api_docs
- void flushSync();
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> lock(
- [FileLock mode = FileLock.EXCLUSIVE, int start = 0, int end = -1]);
-
- // ignore: public_member_api_docs
- void lockSync(
- [FileLock mode = FileLock.EXCLUSIVE, int start = 0, int end = -1]);
-
- // ignore: public_member_api_docs
- Future<RandomAccessFile> unlock([int start = 0, int end = -1]);
-
- // ignore: public_member_api_docs
- void unlockSync([int start = 0, int end = -1]);
-
- // ignore: public_member_api_docs
- String get path;
-}
diff --git a/lib/src/io/shim.dart b/lib/src/io/shim.dart
deleted file mode 100644
index 5434d83..0000000
--- a/lib/src/io/shim.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// For internal use only!
-///
-/// This exposes the handful of static methods required by the local backend.
-/// For browser contexts, these methods will all throw `UnsupportedError`.
-/// For VM contexts, they all delegate to the underlying methods in `dart:io`.
-export 'shim_internal.dart' if (dart.library.io) 'shim_dart_io.dart';
diff --git a/lib/src/io/shim_dart_io.dart b/lib/src/io/shim_dart_io.dart
deleted file mode 100644
index 0c1914a..0000000
--- a/lib/src/io/shim_dart_io.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:io' as io;
-
-/// Creates a new [io.Directory] with the specified [path].
-io.Directory newDirectory(String path) => new io.Directory(path);
-
-/// Creates a new [io.File] with the specified [path].
-io.File newFile(String path) => new io.File(path);
-
-/// Creates a new [io.Link] with the specified [path].
-io.Link newLink(String path) => new io.Link(path);
-
-/// Wraps [io.Directory.systemTemp].
-io.Directory systemTemp() => io.Directory.systemTemp;
-
-/// Wraps [io.Directory.current].
-io.Directory get currentDirectory => io.Directory.current;
-
-/// Wraps [io.Directory.current=].
-set currentDirectory(dynamic path) => io.Directory.current = path;
-
-/// Wraps [io.FileStat.stat].
-Future<io.FileStat> stat(String path) => io.FileStat.stat(path);
-
-/// Wraps [io.FileStat.statSync].
-io.FileStat statSync(String path) => io.FileStat.statSync(path);
-
-/// Wraps [io.FileSystemEntity.identical].
-Future<bool> identical(String path1, String path2) =>
- io.FileSystemEntity.identical(path1, path2);
-
-/// Wraps [io.FileSystemEntity.identicalSync].
-bool identicalSync(String path1, String path2) =>
- io.FileSystemEntity.identicalSync(path1, path2);
-
-/// Wraps [io.FileSystemEntity.isWatchSupported].
-bool get isWatchSupported => io.FileSystemEntity.isWatchSupported;
-
-/// Wraps [io.FileSystemEntity.type].
-Future<io.FileSystemEntityType> type(String path, bool followLinks) =>
- io.FileSystemEntity.type(path, followLinks: followLinks);
-
-/// Wraps [io.FileSystemEntity.typeSync].
-io.FileSystemEntityType typeSync(String path, bool followLinks) =>
- io.FileSystemEntity.typeSync(path, followLinks: followLinks);
diff --git a/lib/src/io/shim_internal.dart b/lib/src/io/shim_internal.dart
deleted file mode 100644
index 920c7c7..0000000
--- a/lib/src/io/shim_internal.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:file/src/io.dart' as io;
-
-const String _requiresIOMsg = 'This operation requires the use of dart:io';
-dynamic _requiresIO() => throw new UnsupportedError(_requiresIOMsg);
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.Directory newDirectory(_) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.File newFile(_) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.Link newLink(_) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.Directory systemTemp() => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.Directory get currentDirectory => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-set currentDirectory(dynamic _) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-Future<io.FileStat> stat(String _) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.FileStat statSync(String _) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-Future<bool> identical(String _, String __) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-bool identicalSync(String _, String __) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-bool get isWatchSupported => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-Future<io.FileSystemEntityType> type(String _, bool __) => _requiresIO();
-
-/// Throws [UnsupportedError]; browsers cannot use the `local` library.
-io.FileSystemEntityType typeSync(String _, bool __) => _requiresIO();
diff --git a/pubspec.yaml b/pubspec.yaml
index 38efe5e..bbb01b8 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: file
-version: 2.3.7
+version: 3.0.0
authors:
- Matan Lurey <matanl@google.com>
- Yegor Jbanov <yjbanov@google.com>
@@ -16,4 +16,4 @@
test: ^0.12.18
environment:
- sdk: '>=1.19.0 <2.0.0'
+ sdk: '>=1.24.0 <2.0.0'