mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Added method FileManager.addCarvedFile() which delegates to new method
SleuthkitCase.addCarvedFile()
This commit is contained in:
parent
2e87809f83
commit
bad30a1621
@ -29,8 +29,10 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.DerivedFile;
|
||||
import org.sleuthkit.datamodel.FsContent;
|
||||
import org.sleuthkit.datamodel.Image;
|
||||
import org.sleuthkit.datamodel.LayoutFile;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskFileRange;
|
||||
|
||||
/**
|
||||
* Abstraction to facilitate access to files and directories.
|
||||
@ -133,6 +135,26 @@ public class FileManager implements Closeable {
|
||||
isFile, parentFile, rederiveDetails, toolName, toolVersion, otherDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a carved file to the VirtualDirectory '$CarvedFiles' in the volume
|
||||
* or file system given by systemId.
|
||||
*
|
||||
* @param name the name of the carved file (containing appropriate
|
||||
* extension)
|
||||
* @param systemId the ID of the parent volume or file system
|
||||
* @param sectors a list of SectorGroups giving this sectors that make up
|
||||
* this carved file.
|
||||
*/
|
||||
public synchronized LayoutFile addCarvedFile(String carvedFileName, long carvedFileSize,
|
||||
long systemId, List<TskFileRange> data) throws TskCoreException {
|
||||
|
||||
if (tskCase == null) {
|
||||
throw new TskCoreException("Attempted to use FileManager after it was closed.");
|
||||
}
|
||||
|
||||
return tskCase.addCarvedFile(carvedFileName, carvedFileSize, systemId, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void close() throws IOException {
|
||||
tskCase = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user