Looking for alternative local file saving methods that work only in Cocos Creator 3.8.7 editor environment (excluding the canvas.toDataURL approach shown)

What alternative methods exist to save files locally exclusively in Cocos Creator 3.8.7 editor environment?

let dataURL = canvas.toDataURL('image/png');
                 let img = document.createElement("a");
                 img.href = dataURL;
                 img.target = "_self";
                 img.download = "screenshot.png"
                 img.click()