diff --git a/apps/tests/file-system-access-tests/file-system-access-tests.ts b/apps/tests/file-system-access-tests/file-system-access-tests.ts index b9b318a3d..44d01e556 100644 --- a/apps/tests/file-system-access-tests/file-system-access-tests.ts +++ b/apps/tests/file-system-access-tests/file-system-access-tests.ts @@ -31,6 +31,5 @@ export var test_file_exists_on_folder = function () { return; } - TKUnit.assertFalse(fs.File.exists(path), "File.exists() returned true for folder!"); -}; - \ No newline at end of file + TKUnit.assertTrue(fs.File.exists(path), "File.exists() returned false for folder!"); +}; \ No newline at end of file diff --git a/file-system/file-system-access.android.ts b/file-system/file-system-access.android.ts index a2f305244..0b74fea65 100644 --- a/file-system/file-system-access.android.ts +++ b/file-system/file-system-access.android.ts @@ -75,7 +75,7 @@ export class FileSystemAccess { public fileExists(path: string): boolean { var file = new java.io.File(path); - return file.exists() && !file.isDirectory(); + return file.exists(); } public folderExists(path: string): boolean { diff --git a/file-system/file-system-access.ios.ts b/file-system/file-system-access.ios.ts index 8cc10c3f9..b12bf0aff 100644 --- a/file-system/file-system-access.ios.ts +++ b/file-system/file-system-access.ios.ts @@ -148,7 +148,7 @@ export class FileSystemAccess { public fileExists(path: string): boolean { var result = this.exists(path); - return result.exists && !result.isDirectory; + return result.exists; } public folderExists(path: string): boolean {