Index: utils/apidoc/apidoc.dart |
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart |
index ef6bae54202583ff08ceee57b6f602620740bff7..74a798e844c6bf5f62609b79ed8a24fd9b08be63 100644 |
--- a/utils/apidoc/apidoc.dart |
+++ b/utils/apidoc/apidoc.dart |
@@ -148,7 +148,7 @@ void main() { |
} |
if (new File.fromPath(libPath).existsSync()) { |
- apidocLibraries.add(_pathToFileUri(libPath.toNativePath())); |
+ apidocLibraries.add(pathos.toUri(libPath.toNativePath())); |
includedLibraries.add(libName); |
} else { |
print('Warning: could not find package at $path'); |
@@ -162,7 +162,7 @@ void main() { |
for (var lib in extraLibraries) { |
var libPath = new Path('../../$lib'); |
if (new File.fromPath(libPath).existsSync()) { |
- apidocLibraries.add(_pathToFileUri(libPath.toNativePath())); |
+ apidocLibraries.add(pathos.toUri(libPath.toNativePath())); |
var libName = libPath.filename.replaceAll('.dart', ''); |
includedLibraries.add(libName); |
} |
@@ -481,13 +481,3 @@ class Apidoc extends Dartdoc { |
} |
} |
-/** Converts a local path string to a `file:` [Uri]. */ |
-Uri _pathToFileUri(String path) { |
- path = pathos.absolute(path); |
- if (Platform.operatingSystem != 'windows') { |
- return Uri.parse('file://$path'); |
- } else { |
- return Uri.parse('file:///${path.replaceAll("\\", "/")}'); |
- } |
-} |
- |