Capacitor Where Are My Files On Android?

I am trying to find the actual paths on device for files when writing them with the Capacitor File Plugin?

The code I am using is directly from the sample, but the documentation is not as detailed as the old cordova-file-plugin.

So what does “/EXTERNAL_STORAGE” translate to on device

  const testFileWrite = async () => {
      try {
        const result = await Filesystem.writeFile({
          path: 'secrets/text.txt',
          data: "This is a test",
          directory: FilesystemDirectory.ExternalStorage,
          encoding: FilesystemEncoding.UTF8
        })
        let stat = await Filesystem.stat({directory: FilesystemDirectory.ExternalStorage, path:'secrets/text.txt'})
        let l = await Filesystem.getUri( {directory: FilesystemDirectory.ExternalStorage, path:'secrets/text.txt'});
        
        console.log('file uri', Capacitor.convertFileSrc(l.uri));
        console.log('stat', stat);
        console.log('Wrote file', result);
      } catch(e) {
        console.error('Unable to write file', e);
      }

      try {
        let ret = await Filesystem.readdir({
          path: 'secrets',
          directory: FilesystemDirectory.ExternalStorage
        });
        console.log(JSON.stringify(ret.files));
      } catch(e) {
        console.error('Unable to read dir', e);
      }
  }

According to capacitor source, it’s using os.android.environment.getExternalStorageDirectory(), which has a big honking scary deprecation warning that it’s going to stop working Real Soon Now.

EDIT: I could have sworn that I linked to the master branch. Did Discourse’s Big Brother Editing change it?

I guess that is what I was alluding to, there seems to be some changes in the way Android is locking down the file system… i noticed because my test device is running latest version of Android and my emulator was on older version and there were issues. No judgement here, just looking form information :flushed: