如何在需要的地方存储图像和文件,必须在有角度的本机脚本中保留根文件夹
const xdocuments: Folder = <Folder>knownFolders.documents();
const xfolder: Folder = <Folder>xdocuments.getFolder("testFolder");
const tempExists: boolean = Folder.exists(xfolder.path);
const xfile: File = xfolder.getFile("test.pdf");
var pdfdata = "xyzbase64string"
let binaryString = pdfdata;
xfile.writeTextSync(binaryString, err => {
console.log("Error saving file");
}, TextModule.encoding.ISO_8859_1);
console.log("possible creating file");