Sleuth Kit Java Bindings (JNI)  4.12.1
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-2022 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.Collections;
22 import java.util.List;
28 
32 public class File extends FsContent {
33 
88  long objId,
89  long dataSourceObjectId,
90  long fsObjId,
92  String name,
93  long metaAddr, int metaSeq,
96  long size,
97  long ctime, long crtime, long atime, long mtime,
98  short modes, int uid, int gid,
99  String md5Hash, String sha256Hash, String sha1Hash,
100  FileKnown knownState, String parentPath, String mimeType,
101  String extension,
102  String ownerUid,
103  Long osAccountObjId,
104  TskData.CollectedStatus collected,
105  List<Attribute> fileAttributes) {
106  super(db, objId, dataSourceObjectId, fsObjId, attrType, attrId, name, TskData.TSK_DB_FILES_TYPE_ENUM.FS,
107  metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime,
108  modes, uid, gid, md5Hash, sha256Hash, sha1Hash, knownState, parentPath, mimeType, extension,
109  ownerUid, osAccountObjId, collected, fileAttributes);
110  }
111 
120  @Override
121  public <T> T accept(SleuthkitItemVisitor<T> visitor) {
122  return visitor.visit(this);
123  }
124 
133  @Override
134  public <T> T accept(ContentVisitor<T> v) {
135  return v.visit(this);
136  }
137 
147  @Override
148  public String toString(boolean preserveState) {
149  return super.toString(preserveState) + "File [\t" + "]\t"; //NON-NLS
150  }
151 
191  @Deprecated
192  @SuppressWarnings("deprecation")
193  protected File(SleuthkitCase db,
194  long objId,
195  long fsObjId,
196  TSK_FS_ATTR_TYPE_ENUM attrType, short attrId,
197  String name,
198  long metaAddr, int metaSeq,
200  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags,
201  long size,
202  long ctime, long crtime, long atime, long mtime,
203  short modes, int uid, int gid,
204  String md5Hash, FileKnown knownState, String parentPath) {
205  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);
206  }
207 
257  @Deprecated
258  @SuppressWarnings("deprecation")
259  File(SleuthkitCase db, long objId, long dataSourceObjectId, long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType, short attrId,
260  String name, long metaAddr, int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
261  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, long size, long ctime, long crtime, long atime, long mtime,
262  short modes, int uid, int gid, String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
263  this(db, objId, dataSourceObjectId, fsObjId, attrType, (int) attrId, name, metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, null, null, knownState, parentPath, mimeType, null, OsAccount.NO_OWNER_ID, OsAccount.NO_ACCOUNT, Collections.emptyList());
264  }
265 
320  @Deprecated
321  @SuppressWarnings("deprecation")
322  File(SleuthkitCase db,
323  long objId,
324  long dataSourceObjectId,
325  long fsObjId,
326  TSK_FS_ATTR_TYPE_ENUM attrType, int attrId,
327  String name,
328  long metaAddr, int metaSeq,
329  TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
330  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags,
331  long size,
332  long ctime, long crtime, long atime, long mtime,
333  short modes, int uid, int gid,
334  String md5Hash, String sha256Hash, String sha1Hash,
335  FileKnown knownState, String parentPath, String mimeType,
336  String extension,
337  String ownerUid,
338  Long osAccountObjId,
339  List<Attribute> fileAttributes) {
340  this(db, objId, dataSourceObjectId, fsObjId, attrType, attrId, name,
341  metaAddr, metaSeq, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime,
342  modes, uid, gid, md5Hash, sha256Hash, sha1Hash, knownState, parentPath, mimeType, extension,
343  ownerUid, osAccountObjId, null, fileAttributes);
344  }
345 }
FS
File that can be found in file system tree.
Definition: TskData.java:694
final TSK_FS_NAME_TYPE_ENUM dirType
final TskData.TSK_FS_ATTR_TYPE_ENUM attrType
Set< TSK_FS_META_FLAG_ENUM > metaFlags
final Set< TskData.TSK_FS_META_MODE_ENUM > modes
final TSK_FS_META_TYPE_ENUM metaType
String toString(boolean preserveState)
Definition: File.java:148

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