Autopsy  4.19.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter Class Reference

Public Member Functions

 LocalFileImporter (SleuthkitCase sleuthkitCase)
 
 LocalFileImporter (SleuthkitCase sleuthkitCase, SleuthkitCase.CaseDbTransaction trans)
 
AbstractFile addLocalFile (File fileOnDisk, String name, String parentPath, Long ctime, Long crtime, Long atime, Long mtime, DataSource dataSource) throws TskCoreException
 

Private Member Functions

SpecialDirectory createLocalFilesDir (long parentId, String name) throws TskCoreException
 
SpecialDirectory getOrMakeDirInDataSource (File directory, Content dataSource) throws TskCoreException
 

Private Attributes

final Map< String, SpecialDirectory > localFileDirMap = new HashMap<>()
 

Static Private Attributes

static final Logger logger = Logger.getLogger(LocalFileImporter.class.getName())
 

Detailed Description

Utility class for adding local files with specified paths in the data source. It is currently assumed that the data source is empty to start or that at least the paths to the files being added do not exist; no checks will be done to see if folders exist prior to creating them through addLocalFile().

Definition at line 41 of file LocalFileImporter.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.LocalFileImporter ( SleuthkitCase  sleuthkitCase)

Create a LocalFileImporter.

Parameters
sleuthkitCaseThe current SleuthkitCase

Definition at line 54 of file LocalFileImporter.java.

org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.LocalFileImporter ( SleuthkitCase  sleuthkitCase,
SleuthkitCase.CaseDbTransaction  trans 
)

Create a LocalFileImporter. The caller is responsible for committing or rolling back the transaction.

Parameters
sleuthkitCaseThe current SleuthkitCase
transThe open CaseDbTransaction

Definition at line 66 of file LocalFileImporter.java.

Member Function Documentation

AbstractFile org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.addLocalFile ( File  fileOnDisk,
String  name,
String  parentPath,
Long  ctime,
Long  crtime,
Long  atime,
Long  mtime,
DataSource  dataSource 
) throws TskCoreException

Add a local file to the database with the specified parameters. Will create any necessary parent folders.

Will not fail if the fileOnDisk does not exist.

Parameters
fileOnDiskThe local file on disk
nameThe name to use in the data source
parentPathThe path to use in the data source
ctimeChange time
crtimeCreated time
atimeAccess time
mtimeModified time
dataSourceThe data source to add the file to
Returns
The AbstractFile that was just created
Exceptions
TskCoreException

Definition at line 91 of file LocalFileImporter.java.

References org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.getOrMakeDirInDataSource().

SpecialDirectory org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.createLocalFilesDir ( long  parentId,
String  name 
) throws TskCoreException
private

Create a new LocalDirectory

Parameters
parentIdThe object ID for parent
nameThe name of the new local directory
Returns
The new LocalDirectory
Exceptions
TskCoreException

Definition at line 180 of file LocalFileImporter.java.

Referenced by org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.getOrMakeDirInDataSource().

SpecialDirectory org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.getOrMakeDirInDataSource ( File  directory,
Content  dataSource 
) throws TskCoreException
private

Returns the SpecialDirectory object corresponding to the given directory, creating it and its parents as needed.

Parameters
directoryThe file to get the SpecialDirectory for
dataSourceThe data source
Returns
The SpecialDirectory object corresponding to the given file
Exceptions
TskCoreException

Definition at line 144 of file LocalFileImporter.java.

References org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.createLocalFilesDir().

Referenced by org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.addLocalFile().

Member Data Documentation

final Map<String, SpecialDirectory> org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.localFileDirMap = new HashMap<>()
private

Definition at line 47 of file LocalFileImporter.java.

final Logger org.sleuthkit.autopsy.datamodel.utils.LocalFileImporter.logger = Logger.getLogger(LocalFileImporter.class.getName())
staticprivate

Definition at line 42 of file LocalFileImporter.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2021 Basis Technology. Generated on: Fri Aug 6 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.