mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Added comments
This commit is contained in:
parent
939885d11d
commit
0d38fd257c
@ -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.
|
* @param dataSource The data source.
|
||||||
*
|
*
|
||||||
@ -186,10 +187,17 @@ final class VMExtractorIngestModule extends DataSourceIngestModuleAdapter {
|
|||||||
return vmFiles;
|
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 {
|
private void writeVirtualMachineToDisk(AbstractFile vmFile, String outputFolderForThisVM) throws IOException {
|
||||||
|
|
||||||
// TODO: check available disk space first? See IngestMonitor.getFreeSpace()
|
// TODO: check available disk space first? See IngestMonitor.getFreeSpace()
|
||||||
|
|
||||||
// check if output folder exists
|
// check if output folder exists
|
||||||
File destinationFolder = Paths.get(outputFolderForThisVM).toFile();
|
File destinationFolder = Paths.get(outputFolderForThisVM).toFile();
|
||||||
if (!destinationFolder.exists()) {
|
if (!destinationFolder.exists()) {
|
||||||
|
@ -189,6 +189,14 @@ public final class VirtualMachineFinderUtility {
|
|||||||
return false;
|
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<String> getAllFilesInFolder(String path) {
|
private static List<String> getAllFilesInFolder(String path) {
|
||||||
// only returns files, skips folders
|
// only returns files, skips folders
|
||||||
File file = new File(path);
|
File file = new File(path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user