Sleuth Kit Java Bindings (JNI)  4.11.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  List<Attribute> fileAttributes) {
105  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, sha256Hash, sha1Hash, knownState, parentPath, mimeType, extension, ownerUid, osAccountObjId, fileAttributes);
106  }
107 
116  @Override
117  public <T> T accept(SleuthkitItemVisitor<T> visitor) {
118  return visitor.visit(this);
119  }
120 
129  @Override
130  public <T> T accept(ContentVisitor<T> v) {
131  return v.visit(this);
132  }
133 
143  @Override
144  public String toString(boolean preserveState) {
145  return super.toString(preserveState) + "File [\t" + "]\t"; //NON-NLS
146  }
147 
187  @Deprecated
188  @SuppressWarnings("deprecation")
189  protected File(SleuthkitCase db,
190  long objId,
191  long fsObjId,
192  TSK_FS_ATTR_TYPE_ENUM attrType, short attrId,
193  String name,
194  long metaAddr, int metaSeq,
196  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags,
197  long size,
198  long ctime, long crtime, long atime, long mtime,
199  short modes, int uid, int gid,
200  String md5Hash, FileKnown knownState, String parentPath) {
201  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);
202  }
203 
253  @Deprecated
254  @SuppressWarnings("deprecation")
255  File(SleuthkitCase db, long objId, long dataSourceObjectId, long fsObjId, TSK_FS_ATTR_TYPE_ENUM attrType, short attrId,
256  String name, long metaAddr, int metaSeq, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType,
257  TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, long size, long ctime, long crtime, long atime, long mtime,
258  short modes, int uid, int gid, String md5Hash, FileKnown knownState, String parentPath, String mimeType) {
259  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());
260  }
261 }
FS
File that can be found in file system tree.
Definition: TskData.java:687
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:144

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.