19 package org.sleuthkit.datamodel;
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
24 import java.util.logging.Level;
25 import java.util.logging.Logger;
41 private static final Logger logger = Logger.getLogger(
FsContent.class.
getName());
42 private volatile String uniquePath;
43 private List<String> metaDataText = null;
113 @SuppressWarnings(
"deprecation")
116 long dataSourceObjectId,
125 long ctime,
long crtime,
long atime,
long mtime,
134 super(db, objId, dataSourceObjectId, attrType, attrId, name, fileType, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, sha256Hash, knownState, parentPath, mimeType, extension, ownerUid, osAccountObjId, fileAttributes);
143 @SuppressWarnings(
"deprecation")
154 parentFileSystem = parent;
164 @SuppressWarnings(
"deprecation")
166 if (parentFileSystem == null) {
167 synchronized (
this) {
168 if (parentFileSystem == null) {
173 return parentFileSystem;
181 @SuppressWarnings(
"deprecation")
183 if (fileHandle == 0) {
184 synchronized (
this) {
185 if (fileHandle == 0) {
198 @SuppressWarnings(
"deprecation")
199 long getFileHandle() {
215 @SuppressWarnings(
"deprecation")
216 protected synchronized
int readInt(byte[] buf,
long offset,
long len) throws TskCoreException {
217 if (offset == 0 &&
size == 0) {
230 }
catch (TskCoreException ex) {
231 logger.log(Level.SEVERE,
"Exception while calling 'getFileSystem' on " +
this, ex);
272 if (uniquePath == null) {
273 StringBuilder sb =
new StringBuilder();
277 uniquePath = sb.toString();
292 if (metaDataText != null) {
298 metaDataText =
new ArrayList<String>();
299 metaDataText.add(
"");
312 @SuppressWarnings(
"deprecation")
314 if (fileHandle != 0) {
340 @SuppressWarnings(
"deprecation")
342 return super.toString(preserveState)
344 +
"fsObjId " + fsObjId
345 +
"\t" +
"uniquePath " + uniquePath
346 +
"\t" +
"fileHandle " + fileHandle
390 @SuppressWarnings(
"deprecation")
395 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, null, knownState, parentPath, null, null,
OsAccount.NO_OWNER_ID,
OsAccount.NO_ACCOUNT, Collections.emptyList() );
449 @SuppressWarnings(
"deprecation")
450 FsContent(SleuthkitCase db,
long objId,
long dataSourceObjectId,
long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType,
short attrId,
451 String name,
long metaAddr,
int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
452 TSK_FS_NAME_FLAG_ENUM dirFlag,
short metaFlags,
long size,
long ctime,
long crtime,
long atime,
long mtime,
453 short modes,
int uid,
int gid, String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
454 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, null, knownState, parentPath, mimeType, null, OsAccount.NO_OWNER_ID, OsAccount.NO_ACCOUNT, Collections.emptyList());
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)
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
TSK_FS_NAME_FLAG_ENUM dirFlag
FileSystem getFileSystem()
AbstractFile getParentDirectory()
Set< TSK_FS_META_FLAG_ENUM > metaFlags
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