19 package org.sleuthkit.datamodel;
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
40 private static final Logger logger = Logger.getLogger(
FsContent.class.
getName());
41 private String uniquePath;
42 private List<String> metaDataText = null;
109 @SuppressWarnings(
"deprecation")
112 long dataSourceObjectId,
121 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, extension);
136 @SuppressWarnings(
"deprecation")
147 parentFileSystem = parent;
157 @SuppressWarnings(
"deprecation")
159 if (parentFileSystem == null) {
160 synchronized (
this) {
161 if (parentFileSystem == null) {
166 return parentFileSystem;
174 @SuppressWarnings(
"deprecation")
176 if (fileHandle == 0) {
177 synchronized (
this) {
178 if (fileHandle == 0) {
191 @SuppressWarnings(
"deprecation")
192 long getFileHandle() {
208 @SuppressWarnings(
"deprecation")
209 protected synchronized
int readInt(byte[] buf,
long offset,
long len) throws TskCoreException {
210 if (offset == 0 &&
size == 0) {
223 }
catch (TskCoreException ex) {
224 logger.log(Level.SEVERE,
"Exception while calling 'getFileSystem' on " +
this, ex);
263 if (uniquePath == null) {
264 StringBuilder sb =
new StringBuilder();
268 uniquePath = sb.toString();
283 if (metaDataText != null) {
289 metaDataText =
new ArrayList<String>();
290 metaDataText.add(
"");
303 @SuppressWarnings(
"deprecation")
305 if (fileHandle != 0) {
331 @SuppressWarnings(
"deprecation")
333 return super.toString(preserveState)
335 +
"fsObjId " + fsObjId
336 +
"\t" +
"uniquePath " + uniquePath
337 +
"\t" +
"fileHandle " + fileHandle
381 @SuppressWarnings(
"deprecation")
386 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, null);
440 @SuppressWarnings(
"deprecation")
441 FsContent(SleuthkitCase db,
long objId,
long dataSourceObjectId,
long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType,
short attrId,
442 String name,
long metaAddr,
int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
443 TSK_FS_NAME_FLAG_ENUM dirFlag,
short metaFlags,
long size,
long ctime,
long crtime,
long atime,
long mtime,
444 short modes,
int uid,
int gid, String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
445 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, null);
FS
File that can be found in file system tree.
final TSK_FS_NAME_TYPE_ENUM dirType
synchronized int readInt(byte[] buf, long offset, long len)
final TSK_FS_NAME_FLAG_ENUM dirFlag
static long openFile(long fsHandle, long fileId, TSK_FS_ATTR_TYPE_ENUM attrType, int attrId, SleuthkitCase skCase)
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
FileSystem getFileSystem()
final Set< TSK_FS_META_FLAG_ENUM > metaFlags
AbstractFile getParentDirectory()
synchronized String getUniquePath()
synchronized void close()
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