Use ProjectUtilities.writeTextFile
to save JSON file
This commit is contained in:
parent
11cd73c70b
commit
df51724b59
@ -277,10 +277,7 @@ cards.sort(function (a, b) {
|
|||||||
});
|
});
|
||||||
const file = new File(Eons.getOpenProject().getFile(), pack_code + '.json');
|
const file = new File(Eons.getOpenProject().getFile(), pack_code + '.json');
|
||||||
printf("Writing '%s'\n", file);
|
printf("Writing '%s'\n", file);
|
||||||
const file_writer = new FileWriter(file);
|
ProjectUtilities.writeTextFile(file, JSON.stringify(cards, null, 4));
|
||||||
file_writer.write(JSON.stringify(cards, null, 4));
|
|
||||||
file_writer.flush();
|
|
||||||
file_writer.close();
|
|
||||||
println("Done!");
|
println("Done!");
|
||||||
|
|
||||||
Eons.getOpenProject().synchronize();
|
Eons.getOpenProject().synchronize();
|
||||||
|
Loading…
Reference in New Issue
Block a user