Skip to content

Commit 699495c

Browse files
author
Jesse Bakker
committed
Use io.dirExists instead of Directory.existsSync for consistency
1 parent 9024daa commit 699495c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/src/system_cache.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import 'dart:io';
66

77
import 'package:path/path.dart' as p;
88

9-
import 'io.dart';
10-
import 'io.dart' as io show createTempDir;
9+
import 'io.dart' as io show createTempDir, dirExists;
1110
import 'log.dart' as log;
1211
import 'package.dart';
1312
import 'package_name.dart';
@@ -38,7 +37,7 @@ class SystemCache {
3837
// If a cache dir already exists in %APPDATA%, use it, else default to %LOCALAPPDATA%
3938
var appData = Platform.environment['APPDATA'];
4039
var appDataCacheDir = p.join(appData, 'Pub', 'Cache');
41-
if (Directory(appDataCacheDir).existsSync()) {
40+
if (io.dirExists(appDataCacheDir)) {
4241
return appDataCacheDir;
4342
}
4443
var localAppData = Platform.environment['LOCALAPPDATA'];

0 commit comments

Comments
 (0)