Added Javadoc and instructions for contribution

This commit is contained in:
Cametendo
2026-04-24 11:20:25 +02:00
parent cb9b464a99
commit 5dc7d88b7f
12 changed files with 431 additions and 0 deletions

View File

@@ -3,7 +3,26 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Executes the dd command for disk flashing operations.
*
* <p>This class handles the actual execution of the dd command with the configured
* parameters (input file, output device, block size, and output flags). It provides
* real-time output streaming and calls the OSDetector for completion messages.</p>
*
* @author Cametendo
* @version 1.0
*/
public class Dd {
/**
* Executes the dd command with the configured parameters.
*
* <p>Runs the dd command using sudo with the specified image file, target device,
* block size, and output flags. Streams the command output in real-time to show
* progress. Upon completion, calls {@link OSDetector#wishWell(String)} to display
* a completion message based on the image file name.</p>
*/
public static void dd() {
try {
ProcessBuilder pb = new ProcessBuilder("sudo", "dd", "if=" + FilePathAdd.ImagePath, "of=" + StorageDeviceLister.fullPath, "bs=" + BlockSize.blockSizeString, "status=progress", "oflag=" + OflagHandler.oflagHandleString);