Flipper/Applications/Custom (UL, RM)/RogueMaster/Scripts/usbdisk.js

13 lines
419 B
JavaScript
Raw Normal View History

2024-02-28 05:53:59 +00:00
let usbdisk = require("usbdisk");
2024-03-25 01:35:38 +00:00
let image = "/ext/apps_assets/mass_storage/test.img";
2024-02-28 05:53:59 +00:00
// print("Creating image...");
// usbdisk.createImage("/ext/apps_data/mass_storage/128MB.img", 128 * 1024 * 1024);
print("Starting UsbDisk...");
2024-03-25 01:35:38 +00:00
usbdisk.start(image);
2024-02-28 05:53:59 +00:00
print("Started, waiting until ejected...");
while (!usbdisk.wasEjected()) {
delay(1000);
}
print("Ejected, stopping UsbDisk...");
usbdisk.stop();
print("Done");