I’m using this capacitor plugin and it’s pretty simple. Example:
await Filesystem.writeFile({
path: “testfile.txt”,
data: JSON.stringify({
CategoryId: 1,
fool: 0
}),
directory: Directory.External,
encoding: Encoding.UTF8,
}).then(() => {
console.log(“Create Successfully”)
}).catch((err) => {
console.log("Error = ", err)
});
in the directory field I need to use a variable of type “Directory”.
There are some directory options:
cash
Date
Documents
External
ExternalStorage
Library
but no option is the sd card.
I didn’t want to use another plugin because I developed everything inside the documents folder and it works. I just wanted to change the directory to the sd card.
Can someone help me?