summaryrefslogtreecommitdiff
path: root/support/arara/source/src/main/kotlin/org/islandoftex/arara/filehandling/Database.kt
diff options
context:
space:
mode:
Diffstat (limited to 'support/arara/source/src/main/kotlin/org/islandoftex/arara/filehandling/Database.kt')
-rw-r--r--support/arara/source/src/main/kotlin/org/islandoftex/arara/filehandling/Database.kt24
1 files changed, 24 insertions, 0 deletions
diff --git a/support/arara/source/src/main/kotlin/org/islandoftex/arara/filehandling/Database.kt b/support/arara/source/src/main/kotlin/org/islandoftex/arara/filehandling/Database.kt
new file mode 100644
index 0000000000..e4b98cd194
--- /dev/null
+++ b/support/arara/source/src/main/kotlin/org/islandoftex/arara/filehandling/Database.kt
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: BSD-3-Clause
+package org.islandoftex.arara.filehandling
+
+import kotlinx.serialization.Serializable
+
+/**
+ * The database model, which keeps track on file changes.
+ *
+ * This database is a map because it maps files to hashes. So the key will
+ * always be a file representation and the value always a string.
+ *
+ * @author Island of TeX
+ * @version 5.0
+ * @since 4.0
+ */
+@Serializable
+data class Database(
+ /**
+ * The whole database is implemented as a map, where
+ * the key is the absolute canonical file and the value
+ * is its corresponding CRC32 hash.
+ */
+ val map: MutableMap<String, String> = mutableMapOf()
+) : MutableMap<String, String> by map