package com.averi.worldscribe.utilities;

/**
 * Created by mark on 28/07/16.
 *
 * Handles the deletion of external app files.
 */
public class ExternalDeleter {
}

@@ -35,16 +35,38 @@
 ities;%0A%0A
+import java.io.File;%0A%0A
 /**%0A * C
@@ -177,11 +177,880 @@
 eleter %7B
+%0A%0A    /**%0A     * Deletes a World.%0A     * @param worldName The name of the world to delete.%0A     * @return True if the World was deleted successfully; false otherwise.%0A     */%0A    public static boolean deleteWorld(String worldName) %7B%0A        File worldDirectory = FileRetriever.getWorldDirectory(worldName);%0A        return deleteRecursive(worldDirectory);%0A    %7D%0A%0A    /**%0A     * Delete a file, or a directory and its contents.%0A     * @param fileOrDirectory The file or directory to be deleted.%0A     * @return True if the file/directory was deleted successfully; false otherwise.%0A     */%0A    private static boolean deleteRecursive(File fileOrDirectory) %7B%0A        if (fileOrDirectory.isDirectory()) %7B%0A            for (File child : fileOrDirectory.listFiles()) %7B%0A                deleteRecursive(child);%0A            %7D%0A        %7D%0A%0A        return fileOrDirectory.delete();%0A    %7D
 %0A%7D%0A

Add deleteWorld to ExternalDeleter