From 6ce51d8662f52465830e7ce5f5e42e3ed9c52710 Mon Sep 17 00:00:00 2001 From: girst Date: Fri, 16 Feb 2024 15:23:33 +0100 Subject: [PATCH] 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. --- legacy/RDFDataSource.jsm | 7 +++++++ 1 file changed, 7 insertions(+) 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()); + } } -- 2.39.3