Sleuth Kit Java Bindings (JNI)  4.9.0
Java bindings for using The Sleuth Kit
VirtualDirectory.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  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.datamodel;
20 
26 
33 public class VirtualDirectory extends SpecialDirectory {
34 
39  public static final String NAME_UNALLOC = "$Unalloc"; //NON-NLS
40 
44  public static final String NAME_CARVED = "$CarvedFiles"; //NON-NLS
45 
72  long objId,
73  long dataSourceObjectId,
74  String name,
78  String parentPath) {
79  super(db, objId, dataSourceObjectId, TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, 0, name,
80  TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR, 0L, 0, dirType, metaType, dirFlag,
81  metaFlags, 0L, 0L, 0L, 0L, 0L, (short) 0, 0, 0, md5Hash, knownState, parentPath, null);
82  }
83 
94  @Override
96  if (this.getDataSourceObjectId() == this.getId()) {
97  // This virtual directory is a data source.
98  return this;
99  } else {
100  return super.getDataSource();
101  }
102  }
103 
113  @Override
114  public <T> T accept(ContentVisitor<T> visitor) {
115  return visitor.visit(this);
116  }
117 
127  @Override
128  public <T> T accept(SleuthkitItemVisitor<T> visitor) {
129  return visitor.visit(this);
130  }
131 
140  @Override
141  public String toString(boolean preserveState) {
142  return super.toString(preserveState) + "VirtualDirectory [\t" + "]\t"; //NON-NLS
143  }
144 
145 }
final TSK_FS_NAME_TYPE_ENUM dirType
final TSK_FS_NAME_FLAG_ENUM dirFlag
final Set< TSK_FS_META_FLAG_ENUM > metaFlags
String toString(boolean preserveState)
VIRTUAL_DIR
Virtual directory (not on fs) with no meta-data entry that can be used to group files of types other ...
Definition: TskData.java:682
final TSK_FS_META_TYPE_ENUM metaType

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