Files
sdk/runtime/lib/uri_patch.dart
T
sgjesse@google.com cfba41b714 Add support for file URIs and extracting the file path from file URIs
A file URI can now be created directly using the constructor Uri.file.

The file path for a file URI can now be extracted using the toFilePath() method.

The path strings involved use either Windows or non-Windows
semantics. Both the Uri.file constructor and the toFilePath()
method have optional anamed arguments for specifying the
semantics. The default semantic is determined from the platform
Dart is running on.

R=ahe@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//21039005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25872 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 12:55:09 +00:00

13 lines
458 B
Dart

// Copyright (c) 2013, 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.
// VM implementation of Uri.
patch class Uri {
static final bool _isWindowsCached = _isWindowsPlatform;
static bool get _isWindowsPlatform native "Uri_isWindowsPlatform";
/* patch */ static bool get _isWindows => _isWindowsCached;
}