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

26 lines
525 B
JavaScript
Raw Normal View History

2024-02-28 05:53:59 +00:00
let storage = require("storage");
let path = "/ext/storage.test";
print("File exists:", storage.exists(path));
print("Writing...");
2024-03-25 01:35:38 +00:00
storage.write(path, "Hello ");
2024-02-28 05:53:59 +00:00
print("File exists:", storage.exists(path));
2024-03-25 01:35:38 +00:00
// Append will create the file even if it doesnt exist!
storage.append(path, "World!");
2024-02-28 05:53:59 +00:00
print("Reading...");
let data = storage.read(path);
print(data);
print("Removing...")
storage.remove(path);
print("Done")
// There's also:
// storage.virtualInit(path);
// storage.virtualMount();
// storage.virtualQuit();