19 package org.sleuthkit.datamodel;
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.ResourceBundle;
24 import java.util.logging.Level;
25 import java.util.logging.Logger;
42 private static final ResourceBundle
bundle = ResourceBundle.getBundle(
"org.sleuthkit.datamodel.Bundle");
110 @SuppressWarnings(
"deprecation")
122 long ctime,
long crtime,
long atime,
long mtime,
127 super(db, objId, dataSourceObjectId, attrType, attrId, name, fileType, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath, mimeType);
137 @SuppressWarnings(
"deprecation")
148 parentFileSystem =
parent;
158 @SuppressWarnings(
"deprecation")
160 if (parentFileSystem == null) {
161 synchronized (
this) {
162 if (parentFileSystem == null) {
175 @SuppressWarnings(
"deprecation")
177 if (fileHandle == 0) {
178 synchronized (
this) {
179 if (fileHandle == 0) {
192 @SuppressWarnings(
"deprecation")
193 long getFileHandle() {
209 @SuppressWarnings(
"deprecation")
210 protected
int readInt(byte[] buf,
long offset,
long len) throws TskCoreException {
211 if (offset == 0 &&
size == 0) {
224 }
catch (TskCoreException ex) {
225 logger.log(Level.SEVERE,
"Exception while calling 'getFileSystem' on " +
this, ex);
262 if (uniquePath == null) {
263 StringBuilder sb =
new StringBuilder();
267 uniquePath = sb.toString();
282 if (metaDataText != null) {
288 metaDataText =
new ArrayList<String>();
289 metaDataText.add(
"");
302 @SuppressWarnings(
"deprecation")
304 if (fileHandle != 0) {
305 synchronized (
this) {
307 if (fileHandle != 0) {
338 @SuppressWarnings(
"deprecation")
340 return super.toString(preserveState)
342 +
"fsObjId " + fsObjId
343 +
"\t" +
"uniquePath " + uniquePath
344 +
"\t" +
"fileHandle " + fileHandle
388 @SuppressWarnings(
"deprecation")
393 this(
db,
objId, db.getDataSourceObjectId(objId),
fsObjId,
attrType, (int) attrId, name,
TSK_DB_FILES_TYPE_ENUM.
FS, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath, null);
446 @SuppressWarnings(
"deprecation")
447 FsContent(SleuthkitCase db,
long objId,
long dataSourceObjectId,
long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType,
short attrId,
448 String name,
long metaAddr,
int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
449 TSK_FS_NAME_FLAG_ENUM dirFlag,
short metaFlags,
long size,
long ctime,
long crtime,
long atime,
long mtime,
450 short modes,
int uid,
int gid, String md5Hash, FileKnown knownState, String parentPath, String
mimeType) {
451 this(
db,
objId,
dataSourceObjectId,
fsObjId,
attrType, (int) attrId, name, TSK_DB_FILES_TYPE_ENUM.FS, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath, mimeType);
FS
File that can be found in file system tree.
final TSK_FS_NAME_TYPE_ENUM dirType
static final Logger logger
static final ResourceBundle bundle
int readInt(byte[] buf, long offset, long len)
final SleuthkitCase tskCase
final TSK_FS_NAME_FLAG_ENUM dirFlag
static long openFile(long fsHandle, long fileId, TSK_FS_ATTR_TYPE_ENUM attrType, int attrId)
static int readFile(long fileHandle, byte[] readBuffer, long offset, long len)
final TskData.TSK_DB_FILES_TYPE_ENUM fileType
synchronized List< String > getMetaDataText()
final TskData.TSK_FS_ATTR_TYPE_ENUM attrType
volatile FileSystem parentFileSystem
FileSystem getFileSystem()
final Set< TSK_FS_META_FLAG_ENUM > metaFlags
AbstractFile getParentDirectory()
synchronized String getUniquePath()
final Set< TskData.TSK_FS_META_MODE_ENUM > modes
TskData.FileKnown knownState
static List< String > getFileMetaDataText(long fileHandle)
SleuthkitCase getSleuthkitCase()
static void closeFile(long fileHandle)
final TSK_FS_META_TYPE_ENUM metaType
static final long UNKNOWN_ID
List< String > metaDataText