Sleuth Kit Java Bindings (JNI) 4.14.0
Java bindings for using The Sleuth Kit
Loading...
Searching...
No Matches
LocalFile.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 */
19package org.sleuthkit.datamodel;
20
21import java.util.Collections;
22import java.util.List;
23import org.sleuthkit.datamodel.TskData.FileKnown;
24import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
25import org.sleuthkit.datamodel.TskData.TSK_FS_ATTR_TYPE_ENUM;
26import org.sleuthkit.datamodel.TskData.TSK_FS_META_TYPE_ENUM;
27import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
28import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_TYPE_ENUM;
29
34public class LocalFile extends AbstractFile {
35
83 LocalFile(SleuthkitCase db,
84 long objId,
85 String name,
89 long size,
90 long ctime, long crtime, long atime, long mtime,
91 String mimeType, String md5Hash, String sha256Hash, String sha1Hash,
93 long parentId, String parentPath,
94 long dataSourceObjectId,
95 String localPath,
96 TskData.EncodingType encodingType,
97 String extension,
98 String ownerUid,
99 Long osAccountObjId) {
100 super(db, objId, dataSourceObjectId, null, TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, 0,
101 name, fileType, 0L, 0, dirType, metaType, dirFlag,
102 metaFlags, size, ctime, crtime, atime, mtime, (short) 0, 0, 0, md5Hash, sha256Hash, sha1Hash, knownState, parentPath, mimeType, extension, ownerUid, osAccountObjId, TskData.CollectedStatus.UNKNOWN, Collections.emptyList());
103 // TODO (AUT-1904): The parent id should be passed to AbstractContent
104 // through the class hierarchy contructors, using
105 // AbstractContent.UNKNOWN_ID as needed.
106 if (parentId > 0) {
107 setParentId(parentId);
108 }
109 super.setLocalFilePath(localPath);
110 setEncodingType(encodingType);
111 }
112
122 @Override
123 public List<TskFileRange> getRanges() throws TskCoreException {
124 return Collections.<TskFileRange>emptyList();
125 }
126
133 @Override
134 public boolean isRoot() {
135 return false;
136 }
137
147 @Override
148 public <T> T accept(ContentVisitor<T> visitor) {
149 return visitor.visit(this);
150 }
151
161 @Override
162 public <T> T accept(SleuthkitItemVisitor<T> visitor) {
163 return visitor.visit(this);
164 }
165
172 @Override
173 public String toString(boolean preserveState) {
174 return super.toString(preserveState) + "LocalFile [\t" + "]\t"; //NON-NLS
175 }
176
208 @Deprecated
209 @SuppressWarnings("deprecation")
210 protected LocalFile(SleuthkitCase db,
211 long objId,
212 String name,
216 long size,
217 long ctime, long crtime, long atime, long mtime,
219 String parentPath,
220 String localPath) {
221 this(db,
222 objId,
223 name,
224 fileType,
227 size,
229 null, md5Hash, null, null, knownState,
231 db.getDataSourceObjectId(objId),
232 localPath,
233 TskData.EncodingType.NONE, null, OsAccount.NO_OWNER_ID, OsAccount.NO_ACCOUNT);
234 }
235
268 @Deprecated
270 long objId,
271 String name,
275 long size,
276 long ctime, long crtime, long atime, long mtime,
278 String parentPath, String localPath, long parentId) {
279 this(db, objId, name, fileType, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, md5Hash, knownState, parentPath, localPath);
280 }
281
313 @Deprecated
315 long objId,
316 String name,
319 long size,
320 long ctime, long crtime, long atime, long mtime,
322 String parentPath, String localPath, long parentId) {
324 }
325}
Set< TSK_FS_META_FLAG_ENUM > metaFlags
final TSK_FS_NAME_TYPE_ENUM dirType
final TSK_FS_META_TYPE_ENUM metaType
final TskData.TSK_DB_FILES_TYPE_ENUM fileType
String toString(boolean preserveState)
List< TskFileRange > getRanges()
LocalFile(SleuthkitCase db, long objId, String name, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, long size, long ctime, long crtime, long atime, long mtime, String md5Hash, FileKnown knownState, String parentPath, String localPath, long parentId)
LocalFile(SleuthkitCase db, long objId, String name, TSK_DB_FILES_TYPE_ENUM fileType, TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, long size, long ctime, long crtime, long atime, long mtime, String md5Hash, FileKnown knownState, String parentPath, String localPath, long parentId)
LOCAL
Local file that was added (not from a disk image).
Definition TskData.java:698

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