Autopsy  4.16.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

Constructor & Destructor Documentation

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

Create a LocalFileImporter.

sleuthkitCaseThe current SleuthkitCase

Definition at line 54 of file

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.

sleuthkitCaseThe current SleuthkitCase
transThe open CaseDbTransaction

Definition at line 66 of file

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.

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
The AbstractFile that was just created

Definition at line 91 of file

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

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

Create a new LocalDirectory

parentIdThe object ID for parent
nameThe name of the new local directory
The new LocalDirectory

Definition at line 180 of file

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

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

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

directoryThe file to get the SpecialDirectory for
dataSourceThe data source
The SpecialDirectory object corresponding to the given file

Definition at line 144 of file

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<>()

Definition at line 47 of file

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

Definition at line 42 of file

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

Copyright © 2012-2020 Basis Technology. Generated on: Tue Sep 22 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.