package org.cryptomator.cryptofs.health.dirid;

import org.cryptomator.cryptofs.CryptoPathMapper;
import org.cryptomator.cryptofs.DirectoryIdBackup;
import org.cryptomator.cryptofs.VaultConfig;
import org.cryptomator.cryptofs.health.api.DiagnosticResult;
import org.cryptomator.cryptolib.api.Cryptor;
import org.cryptomator.cryptolib.api.Masterkey;

import java.io.IOException;
import java.nio.file.Path;

/**
 * TODO: adjust DirIdCheck
 */
public class MissingDirIdBackup implements DiagnosticResult {

	private final Path cipherDir;
	private final String dirId;

	MissingDirIdBackup(String dirId, Path cipherDir)  {
		this.cipherDir = cipherDir;
		this.dirId = dirId;
	}

	@Override
	public Severity getSeverity() {
		return Severity.WARN; //TODO: decide severity
	}

	@Override
	public void fix(Path pathToVault, VaultConfig config, Masterkey masterkey, Cryptor cryptor) throws IOException {
		DirectoryIdBackup dirIdBackup = new DirectoryIdBackup(cryptor);
		dirIdBackup.execute(new CryptoPathMapper.CiphertextDirectory(dirId,cipherDir));
	}
}

@@ -411,359 +411,337 @@
  * T
-ODO: adjust DirIdCheck%0A */%0Apublic class MissingDirIdBackup implements DiagnosticResult %7B%0A%0A%09private final Path cipherDir;%0A%09private final String dirId;%0A%0A%09MissingDirIdBackup(String dirId, Path cipherDir)  %7B%0A%09%09this.cipherDir = cipherDir;%0A%09%09this.dirId = dirId;%0A%09%7D%0A%0A%09@Override%0A%09public Severity getSeverity() %7B%0A%09%09return Severity.WARN; //TODO: decide severity
+he dir id backup file is missing.%0A */%0Apublic record MissingDirIdBackup(String dirId, Path cipherDir) implements DiagnosticResult %7B%0A%0A%09@Override%0A%09public Severity getSeverity() %7B%0A%09%09return Severity.WARN;%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return String.format(%22Directory ID backup for directory %25s is missing.%22, cipherDir);
 %0A%09%7D%0A
@@ -1001,16 +1001,17 @@
 y(dirId,
+ 
 cipherDi

Refactor to record and add docs.