Files
armorpaint/base/Sources/ImportPlugin.ts
T
luboslenco ee67b50c0f Use ts
2024-01-17 18:53:31 +01:00

17 lines
448 B
TypeScript

class ImportPlugin {
static run = (path: string) => {
if (!Path.isPlugin(path)) {
Console.error(Strings.error1());
return;
}
let filename = path.substr(path.lastIndexOf(Path.sep) + 1);
let dstPath = Path.data() + Path.sep + "plugins" + Path.sep + filename;
File.copy(path, dstPath); // Copy to plugin folder
BoxPreferences.filesPlugin = null; // Refresh file list
Console.info(tr("Plugin imported:") + " " + filename);
}
}