Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: sdk/lib/core/resource.dart

Issue 1374953002: Remove Resource class and support functions. Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove reference to resource class in dart2js compiler. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/core/resource.dart
diff --git a/sdk/lib/core/resource.dart b/sdk/lib/core/resource.dart
deleted file mode 100644
index 17bdebcb1ec5e752336f7edc15ac8443b588aa86..0000000000000000000000000000000000000000
--- a/sdk/lib/core/resource.dart
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2015, 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.
-
-part of dart.core;
-
-/**
- * A resource that can be read into the program.
- *
- * WARNING: This API is _experimental_,
- * and it may be changed or removed in future releases
- *
- * A resource is data that can be located using a URI and read into
- * the program at runtime.
- * The URI may use the `package` scheme to read resources provided
- * along with package sources.
- */
-abstract class Resource {
- /**
- * Creates a resource object with the given [uri] as location.
- *
- * The `uri` is a string containing a valid URI.
- * If the string is not a valid URI, using any of the functions on
- * the resource object will fail.
- *
- * The URI may be relative, in which case it will be resolved
- * against [Uri.base] before being used.
- *
- * The URI may use the `package` scheme, which is always supported.
- * Other schemes may also be supported where possible.
- */
- external const factory Resource(String uri);
-
- /**
- * The location `uri` of this resource.
- *
- * This is a [Uri] of the `uri` parameter given to the constructor.
- * If the parameter was not a valid URI, reading `uri` may fail.
- */
- Uri get uri;
-
- /** Read the resource content as a stream of bytes. */
- Stream<List<int>> openRead();
-
- /** Read the resource content. */
- Future<List<int>> readAsBytes();
-
- /**
- * Read the resource content as a string.
- *
- * The content is decoded into a string using an [Encoding].
- * If no other encoding is provided, it defaults to UTF-8.
- */
- Future<String> readAsString({Encoding encoding});
-}

Powered by Google App Engine
This is Rietveld 408576698