diff options
author | girst <girst@users.noreply.github.com> | 2024-02-16 15:23:33 +0100 |
---|---|---|
committer | girst <girst@users.noreply.github.com> | 2024-02-16 15:26:01 +0100 |
commit | 6ce51d8662f52465830e7ce5f5e42e3ed9c52710 (patch) | |
tree | 6721c64b71c40dc3af83794c10d2a0258de09e14 /legacy | |
parent | 553416c2d6d3c760cf98bd2c4afbaf0442321951 (diff) | |
download | legacywolf-6ce51d8662f52465830e7ce5f5e42e3ed9c52710.tar.gz legacywolf-6ce51d8662f52465830e7ce5f5e42e3ed9c52710.zip |
keep RDFDataSource.saveToFile around
minimizes the diff we need to keep. note that as previously mentioned
this requires mozilla>=85, but shouldn't cause issues unless called.
This partially reverts commit 553416c2d6d3c760cf98bd2c4afbaf0442321951.
Diffstat (limited to 'legacy')
-rw-r--r-- | legacy/RDFDataSource.jsm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/legacy/RDFDataSource.jsm b/legacy/RDFDataSource.jsm index f285013..579d075 100644 --- a/legacy/RDFDataSource.jsm +++ b/legacy/RDFDataSource.jsm @@ -1507,4 +1507,11 @@ class RDFDataSource { var serializer = new XMLSerializer(); return serializer.serializeToString(this._document); } + + /** + * Saves the RDF/XML to a file. + */ + async saveToFile(file) { + return IOUtils.writeUTF8(file, this.serializeToString()); + } } |