Sleuth Kit Java Bindings (JNI) 4.14.0
Java bindings for using The Sleuth Kit
Loading...
Searching...
No Matches
LocalDirectory.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
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20package org.sleuthkit.datamodel;
21
22import java.util.logging.Level;
23import java.util.logging.Logger;
24import org.sleuthkit.datamodel.TskData.FileKnown;
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 LocalDirectory extends SpecialDirectory {
35 private static final Logger logger = Logger.getLogger(LocalDirectory.class.getName());
36
61 LocalDirectory(SleuthkitCase db,
62 long objId,
63 long dataSourceObjectId,
64 String name,
67 String md5Hash, String sha256Hash, String sha1Hash,
69 String parentPath) {
70 super(db, objId, dataSourceObjectId, null, TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, 0, name,
72 metaFlags, 0L, 0L, 0L, 0L, 0L, (short) 0, 0, 0, md5Hash, sha256Hash, sha1Hash, knownState, parentPath, null);
73 }
74
80 @Override
81 public boolean isDataSource() {
82 return false;
83 }
84
92 @Override
93 public boolean isRoot() {
94 try {
95 return (getParent() instanceof FileSystem);
96 } catch (TskCoreException ex) {
97 logger.log(Level.SEVERE, "Error getting parent of LocalDirectory with object ID " + getId(), ex);
98 return false;
99 }
100 }
101
110 @Override
111 public <T> T accept(ContentVisitor<T> visitor) {
112 return visitor.visit(this);
113 }
114
123 @Override
124 public <T> T accept(SleuthkitItemVisitor<T> visitor) {
125 return visitor.visit(this);
126 }
127
138 @Override
139 public String toString(boolean preserveState) {
140 return super.toString(preserveState) + "LocalDirectory [\t" + "]\t"; //NON-NLS
141 }
142}
Set< TSK_FS_META_FLAG_ENUM > metaFlags
final TSK_FS_NAME_TYPE_ENUM dirType
final TSK_FS_META_TYPE_ENUM metaType
String toString(boolean preserveState)
LOCAL_DIR
Local directory that was added (not from a disk image).
Definition TskData.java:703

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.