diff --git a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java index b18a7f0766..0835098020 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VMExtractorIngestModule.java @@ -86,12 +86,12 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { String outputFolderForThisVM; List vmFiles; - + // Configure and start progress bar - looking for VM files progressBar.progress(NbBundle.getMessage(this.getClass(), "VMExtractorIngestModule.searchingImage.message")); // Not sure how long it will take for search to complete. progressBar.switchToIndeterminate(); - + try { // look for all VM files vmFiles = findVirtualMachineFiles(dataSource); @@ -168,7 +168,8 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { } /** - * Locate all supported virtual machine files, if any, contained in a data source. + * Locate all supported virtual machine files, if any, contained in a data + * source. * * @param dataSource The data source. * @@ -186,10 +187,17 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter { return vmFiles; } + /** + * Writes out an abstract file to a specified output folder. + * + * @param vmFile Abstract file to write to disk. + * @param outputFolderForThisVM Absolute path to output folder. + * + * @throws IOException + */ private void writeVirtualMachineToDisk(AbstractFile vmFile, String outputFolderForThisVM) throws IOException { // TODO: check available disk space first? See IngestMonitor.getFreeSpace() - // check if output folder exists File destinationFolder = Paths.get(outputFolderForThisVM).toFile(); if (!destinationFolder.exists()) { diff --git a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinderUtility.java b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinderUtility.java index d1fb8f1d2b..c0aac6a3f3 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinderUtility.java +++ b/Core/src/org/sleuthkit/autopsy/modules/vmextractor/VirtualMachineFinderUtility.java @@ -189,6 +189,14 @@ public final class VirtualMachineFinderUtility { return false; } + /** + * Returns a list of all file names in the folder of interest. Sub-folders + * are excluded. + * + * @param path Absolute path of the folder of interest + * + * @return List of all file names in the folder of interest + */ private static List getAllFilesInFolder(String path) { // only returns files, skips folders File file = new File(path);