Sleuth Kit Java Bindings (JNI)  4.11.0
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-2017 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 
60  long objId,
61  long dataSourceObjectId,
62  String name,
65  String md5Hash, String sha256Hash, FileKnown knownState,
66  String parentPath) {
67  super(db, objId, dataSourceObjectId, TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, 0, name,
68  TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL_DIR, 0L, 0, dirType, metaType, dirFlag,
69  metaFlags, 0L, 0L, 0L, 0L, 0L, (short) 0, 0, 0, md5Hash, sha256Hash, knownState, parentPath, null);
70  }
71 
77  public boolean isDataSource() {
78  return false;
79  }
80 
88  @Override
89  public boolean isRoot() {
90  try {
91  return (getParent() instanceof FileSystem);
92  } catch (TskCoreException ex) {
93  logger.log(Level.SEVERE, "Error getting parent of LocalDirectory with object ID " + getId(), ex);
94  return false;
95  }
96  }
97 
106  @Override
107  public <T> T accept(ContentVisitor<T> visitor) {
108  return visitor.visit(this);
109  }
110 
119  @Override
120  public <T> T accept(SleuthkitItemVisitor<T> visitor) {
121  return visitor.visit(this);
122  }
123 
134  @Override
135  public String toString(boolean preserveState) {
136  return super.toString(preserveState) + "LocalDirectory [\t" + "]\t"; //NON-NLS
137  }
138 }
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:693
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.