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

Unified Diff: package_config/lib/src/packages_io_impl.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « package_config/lib/src/packages_impl.dart ('k') | package_config/lib/src/util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: package_config/lib/src/packages_io_impl.dart
diff --git a/package_config/lib/src/packages_io_impl.dart b/package_config/lib/src/packages_io_impl.dart
deleted file mode 100644
index 21b61fdab0591cc483d1af2d53cee5515f659d90..0000000000000000000000000000000000000000
--- a/package_config/lib/src/packages_io_impl.dart
+++ /dev/null
@@ -1,37 +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.
-
-/// Implementations of [Packages] that can only be used in server based
-/// applications.
-library package_config.packages_io_impl;
-
-import "dart:collection" show UnmodifiableMapView;
-import "dart:io" show Directory;
-import "package:path/path.dart" as path;
-import "packages_impl.dart";
-
-/// A [Packages] implementation based on a local directory.
-class FilePackagesDirectoryPackages extends PackagesBase {
- final Directory _packageDir;
- FilePackagesDirectoryPackages(this._packageDir);
-
- Uri getBase(String packageName) =>
- new Uri.file(path.join(_packageDir.path, packageName, '.'));
-
- Iterable<String> _listPackageNames() {
- return _packageDir.listSync()
- .where((e) => e is Directory)
- .map((e) => path.basename(e.path));
- }
-
- Iterable<String> get packages => _listPackageNames();
-
- Map<String, Uri> asMap() {
- var result = <String, Uri>{};
- for (var packageName in _listPackageNames()) {
- result[packageName] = getBase(packageName);
- }
- return new UnmodifiableMapView<String, Uri>(result);
- }
-}
« no previous file with comments | « package_config/lib/src/packages_impl.dart ('k') | package_config/lib/src/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698