Flipper/Applications/Custom (UL, RM, XFW)/RogueMaster/Scripts/usbdisk.js
2024-03-24 21:35:38 -04:00

13 lines
419 B
JavaScript

let usbdisk = require("usbdisk");
let image = "/ext/apps_assets/mass_storage/test.img";
// print("Creating image...");
// usbdisk.createImage("/ext/apps_data/mass_storage/128MB.img", 128 * 1024 * 1024);
print("Starting UsbDisk...");
usbdisk.start(image);
print("Started, waiting until ejected...");
while (!usbdisk.wasEjected()) {
delay(1000);
}
print("Ejected, stopping UsbDisk...");
usbdisk.stop();
print("Done");