Ionic 6 @capacitor/filesystem write file on sd-card

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?

Have your tried to use either External or ExternalStorage? SD card is considered external.

I think what is missing are permissions to access.
i’m using MANAGE_EXTERNAL_STORAGE
READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE