Sleuth Kit Java Bindings (JNI)  4.12.1
Java bindings for using The Sleuth Kit
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  */
20 package org.sleuthkit.datamodel;
21 
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
29 
34 public class LocalDirectory extends SpecialDirectory {
35  private static final Logger logger = Logger.getLogger(LocalDirectory.class.getName());
36 
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,
71  TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL_DIR, 0L, 0, dirType, metaType, dirFlag,
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 }
final TSK_FS_NAME_TYPE_ENUM dirType
Set< TSK_FS_META_FLAG_ENUM > metaFlags
LOCAL_DIR
Local directory that was added (not from a disk image)
Definition: TskData.java:702
String toString(boolean preserveState)
final TSK_FS_META_TYPE_ENUM metaType

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.