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;
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
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) {
306 synchronized (
this) {
308 if (fileHandle != 0) {
336 @SuppressWarnings(
"deprecation")
338 return super.toString(preserveState)
340 +
"fsObjId " + fsObjId
341 +
"\t" +
"uniquePath " + uniquePath
342 +
"\t" +
"fileHandle " + fileHandle
386 @SuppressWarnings(
"deprecation")
391 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);
445 @SuppressWarnings(
"deprecation")
446 FsContent(SleuthkitCase db,
long objId,
long dataSourceObjectId,
long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType,
short attrId,
447 String name,
long metaAddr,
int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
448 TSK_FS_NAME_FLAG_ENUM dirFlag,
short metaFlags,
long size,
long ctime,
long crtime,
long atime,
long mtime,
449 short modes,
int uid,
int gid, String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
450 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
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)
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()
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