I have a working electron project that uses capacitor to read the local file system. Specifically, the code that works:
import { Plugins, FilesystemDirectory, FilesystemEncoding } from '@capacitor/core';
const { Filesystem } = Plugins;
var storageLocation = await Filesystem.getUri({
directory: FilesystemDirectory.Documents,
path: `path_to_directory`
})
Now that electron is deprecated from capacitor, I am trying to transition the project to use capacitor-community/electron. Most of everything translates 1 to 1, but I am unable to properly read files from the local file system. does not work, and neither does:
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
which I got from: Capacitor - build cross platform apps with the web
I am able to get some sort of file path, but the URI turns into
capacitor-electron://-/DOCUMENTS/path_to_directory
Has anyone else ran into this issue?