Sleuth Kit Java Bindings (JNI)  4.3
Java bindings for using The Sleuth Kit
File.java
Go to the documentation of this file.
1 /*
2  * SleuthKit Java Bindings
3  *
4  * Copyright 2011-2016 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.datamodel;
20 
21 import java.util.List;
27 
31 public class File extends FsContent {
32 
80  long objId,
81  long dataSourceObjectId,
82  long fsObjId,
84  String name,
85  long metaAddr, int metaSeq,
88  long size,
89  long ctime, long crtime, long atime, long mtime,
90  short modes, int uid, int gid,
91  String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
92  super(db, objId, dataSourceObjectId, fsObjId, attrType, attrId, name, TskData.TSK_DB_FILES_TYPE_ENUM.FS, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath, mimeType);
93  }
94 
103  @Override
104  public List<Content> getChildren() throws TskCoreException {
105  return getSleuthkitCase().getAbstractFileChildren(this, TskData.TSK_DB_FILES_TYPE_ENUM.DERIVED);
106  }
107 
117  @Override
118  public List<Long> getChildrenIds() throws TskCoreException {
119  return getSleuthkitCase().getAbstractFileChildrenIds(this, TskData.TSK_DB_FILES_TYPE_ENUM.DERIVED);
120  }
121 
130  @Override
131  public <T> T accept(SleuthkitItemVisitor<T> v) {
132  return v.visit(this);
133  }
134 
143  @Override
144  public <T> T accept(ContentVisitor<T> v) {
145  return v.visit(this);
146  }
147 
157  @Override
158  public String toString(boolean preserveState) {
159  return super.toString(preserveState) + "File [\t" + "]\t"; //NON-NLS
160  }
161 
201  @Deprecated
202  @SuppressWarnings("deprecation")
203  protected File(SleuthkitCase db,
204  long objId,
205  long fsObjId,
206  TSK_FS_ATTR_TYPE_ENUM attrType, short attrId,
207  String name,
208  long metaAddr, int metaSeq,
210  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags,
211  long size,
212  long ctime, long crtime, long atime, long mtime,
213  short modes, int uid, int gid,
214  String md5Hash, FileKnown knownState, String parentPath) {
215  this(db, objId, db.getDataSourceObjectId(objId), fsObjId, attrType, attrId, name, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath, null);
216  }
217 
266  @Deprecated
267  @SuppressWarnings("deprecation")
268  File(SleuthkitCase db, long objId, long dataSourceObjectId, long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType, short attrId,
269  String name, long metaAddr, int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
270  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, long size, long ctime, long crtime, long atime, long mtime,
271  short modes, int uid, int gid, String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
272  this(db, objId, dataSourceObjectId, fsObjId, attrType, (int) attrId, name, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath, mimeType);
273  }
274 }
FS
File that can be found in file system tree.
Definition: TskData.java:656
final TSK_FS_NAME_TYPE_ENUM dirType
final TSK_FS_NAME_FLAG_ENUM dirFlag
List< Content > getChildren()
Definition: File.java:104
final TskData.TSK_FS_ATTR_TYPE_ENUM attrType
final Set< TSK_FS_META_FLAG_ENUM > metaFlags
final Set< TskData.TSK_FS_META_MODE_ENUM > modes
List< Long > getChildrenIds()
Definition: File.java:118
DERIVED
File derived from a parent file (i.e. from ZIP)
Definition: TskData.java:658
final TSK_FS_META_TYPE_ENUM metaType
String toString(boolean preserveState)
Definition: File.java:158

Copyright © 2011-2015 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.