From 158c0e0ef40c16d9ae38a7fa70b10b893a80d7b3 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Thu, 7 Aug 2025 16:29:16 +0200 Subject: turn FIDInfo into PathInfo --- src/main/kotlin/FIDInfo.kt | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/main/kotlin/FIDInfo.kt (limited to 'src/main/kotlin/FIDInfo.kt') diff --git a/src/main/kotlin/FIDInfo.kt b/src/main/kotlin/FIDInfo.kt deleted file mode 100644 index dbbc945..0000000 --- a/src/main/kotlin/FIDInfo.kt +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This class holds all info about File IDs (FIDs). - */ -class FIDInfo() { - private val inUse: MutableSet = mutableSetOf() - - /** - * A single FID. - * - * @param fid The actual FID value. - * @param path The path of the FID, represented as successive path name elements. - * @param qid The QID associated with the FID. - */ - data class FID(val fid: UInt, val path: List, val qid: QID) - - /** - * Add a FID with the associated file path and QID. - */ - fun addFID(fid: FID) { - this.inUse.add(fid) - } - - /** - * Find the path associated to a FID. - * - * @param fid The FID to find the path of. - * @return The path if [fid] could be found, or null otherwise. - */ - fun findPathByFID(fid: UInt): List? { - return this.inUse.find { x -> x.fid == fid }?.path - } - - /** - * Find the FID associated to a path. - * - * @param path The path to find the FID of. - * @return The FID if [path] has an associated FID, or null otherwise. - */ - fun findFIDByPath(path: List): UInt? { - return this.inUse.find { x -> x.path == path }?.fid - } -} \ No newline at end of file -- cgit v1.2.3