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');
|
||||
printf("Writing '%s'\n", file);
|
||||
const file_writer = new FileWriter(file);
|
||||
file_writer.write(JSON.stringify(cards, null, 4));
|
||||
file_writer.flush();
|
||||
file_writer.close();
|
||||
ProjectUtilities.writeTextFile(file, JSON.stringify(cards, null, 4));
|
||||
println("Done!");
|
||||
|
||||
Eons.getOpenProject().synchronize();
|
||||
|
Loading…
Reference in New Issue
Block a user