Can we able to get Os Name XD is currently running
Edit
async function checkPlatform() {
const storage = await require("uxp").storage;
const pluginFolder = await storage.localFileSystem.getPluginFolder();
var path = pluginFolder.nativePath;
var result = "";
if (path.startsWith("/Users")) {
result = "mac"
} else if (path.startsWith("C:\\Users")) {
result = "windows";
} else {
result = "this_is_madness";
}
return result;
}
to get platform =>
checkPlatform().then(
result => {
console.log(result);
}
);