|
|
|
|
@ -392,14 +392,14 @@ public class StoredCollection<T: Storable>: RandomAccessCollection, SomeCollecti |
|
|
|
|
|
|
|
|
|
/// Writes all the items as a json array inside a file |
|
|
|
|
fileprivate func _write() { |
|
|
|
|
Logger.log("Start write to \(T.fileName())...") |
|
|
|
|
// Logger.log("Start write to \(T.fileName())...") |
|
|
|
|
do { |
|
|
|
|
let jsonString: String = try self.items.jsonString() |
|
|
|
|
try self._store.write(content: jsonString, fileName: T.fileName()) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) // TODO how to notify the main project |
|
|
|
|
} |
|
|
|
|
Logger.log("End write") |
|
|
|
|
// Logger.log("End write") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Simply clears the items of the collection |
|
|
|
|
|