UXP delete file

Someone shine some light here:. in the documentation we have this function to create a file "

const myNovelTxtFile = await aFolder.createFile(“mynovel.txt”);

Is there a way we can delete this file since there’s no method in the documentation on delete functionality.

eg. await aFolder.DeleteFile(“mynovel.txt”);

something like that above.

await myNovelTxtFile.delete();

1 Like
const file = await aFolder.getEntry('mynovel.txt')

Edit: @ddbell beat me :slight_smile:

1 Like