File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import "dart:io" ;
6
6
7
- import "package:analyzer/src/generated/java_io.dart" ;
8
-
9
- class FileUtilities2 {
10
- static JavaFile createFile (String path) {
11
- return JavaFile (path).getAbsoluteFile ();
12
- }
13
- }
14
-
15
7
class OSUtilities {
16
8
static String LINE_SEPARATOR = isWindows () ? '\r\n ' : '\n ' ;
17
9
static bool isMac () => Platform .operatingSystem == 'macos' ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import "dart:io";
6
6
7
7
import 'package:path/path.dart' as path;
8
8
9
+ @Deprecated ('Use ResourceProvider and path context instead.' )
9
10
class JavaFile {
10
11
@deprecated
11
12
static path.Context pathContext = path.context;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ main() {
16
16
expect (path.context.isAbsolute (absolutePath), isTrue,
17
17
reason: '"$absolutePath " is not absolute' );
18
18
// test that toURI() returns an absolute URI
19
+ // ignore: deprecated_member_use_from_same_package
19
20
Uri uri = JavaFile (absolutePath).toURI ();
20
21
expect (uri.isAbsolute, isTrue);
21
22
expect (uri.scheme, 'file' );
@@ -30,6 +31,7 @@ main() {
30
31
// it may be not on Windows, if "temp" is on other disk.
31
32
String relPath = path.context.relative (absolutePath);
32
33
// test that toURI() returns an absolute URI
34
+ // ignore: deprecated_member_use_from_same_package
33
35
Uri uri = JavaFile (relPath).toURI ();
34
36
expect (uri.isAbsolute, isTrue);
35
37
expect (uri.scheme, 'file' );
You can’t perform that action at this time.
0 commit comments