diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java index 5b99f5cb2f..c5fd98e130 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java @@ -65,8 +65,6 @@ private Charset getEncoding(String encoding) { private File getDirectory(String directory) { Context c = bridge.getContext(); switch(directory) { - case "APPLICATION": - return c.getFilesDir(); case "DOCUMENTS": return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS); case "DATA": diff --git a/core/src/core-plugin-definitions.ts b/core/src/core-plugin-definitions.ts index 24007f9f57..24c090e0cb 100644 --- a/core/src/core-plugin-definitions.ts +++ b/core/src/core-plugin-definitions.ts @@ -566,10 +566,6 @@ export interface FilesystemPlugin extends Plugin { } export enum FilesystemDirectory { - /** - * The Application directory - */ - Application = 'APPLICATION', /** * The Documents directory */ diff --git a/example/src/pages/filesystem/filesystem.ts b/example/src/pages/filesystem/filesystem.ts index b7e256f108..44b252e55d 100644 --- a/example/src/pages/filesystem/filesystem.ts +++ b/example/src/pages/filesystem/filesystem.ts @@ -109,7 +109,7 @@ export class FilesystemPage { try { let ret = await Plugins.Filesystem.getUri({ path: 'text.txt', - directory: FilesystemDirectory.Application + directory: FilesystemDirectory.Data }); alert(ret.uri); } catch(e) { diff --git a/ios/Capacitor/Capacitor/Plugins/Filesystem.swift b/ios/Capacitor/Capacitor/Plugins/Filesystem.swift index 43105055d0..0618dd5559 100644 --- a/ios/Capacitor/Capacitor/Plugins/Filesystem.swift +++ b/ios/Capacitor/Capacitor/Plugins/Filesystem.swift @@ -12,8 +12,6 @@ public class CAPFilesystemPlugin : CAPPlugin { switch directory { case "DOCUMENTS": return .documentDirectory - case "APPLICATION": - return .applicationDirectory case "CACHE": return .cachesDirectory default: diff --git a/site/docs-md/apis/filesystem/index.md b/site/docs-md/apis/filesystem/index.md index 9dbd39c70b..34a8625dfd 100644 --- a/site/docs-md/apis/filesystem/index.md +++ b/site/docs-md/apis/filesystem/index.md @@ -137,20 +137,6 @@ async rename() { } } -async copy() { - try { - // This example copies a file from the app directory to the documents directory - let ret = await Filesystem.copy({ - from: 'assets/icon.png', - to: 'icon.png', - directory: FilesystemDirectory.Application, - toDirectory: FilesystemDirectory.Documents - }); - } catch(e) { - console.error('Unable to copy file', e); - } -} - async copy() { try { // This example copies a file within the documents directory