Sleuth Kit Java Bindings (JNI)  4.12.1
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-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  */
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 
75  long objId,
76  long dataSourceObjectId,
77  Long fileSystemObjectId,
78  String name,
81  String md5Hash, String sha256Hash, String sha1Hash,
83  String parentPath ) {
84  super(db, objId, dataSourceObjectId, fileSystemObjectId, TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, 0, name,
85  TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR, 0L, 0, dirType, metaType, dirFlag,
86  metaFlags, 0L, 0L, 0L, 0L, 0L, (short) 0, 0, 0, md5Hash, sha256Hash, sha1Hash, knownState, parentPath, null);
87  }
88 
99  @Override
101  if (this.getDataSourceObjectId() == this.getId()) {
102  // This virtual directory is a data source.
103  return this;
104  } else {
105  return super.getDataSource();
106  }
107  }
108 
118  @Override
119  public <T> T accept(ContentVisitor<T> visitor) {
120  return visitor.visit(this);
121  }
122 
132  @Override
133  public <T> T accept(SleuthkitItemVisitor<T> visitor) {
134  return visitor.visit(this);
135  }
136 
145  @Override
146  public String toString(boolean preserveState) {
147  return super.toString(preserveState) + "VirtualDirectory [\t" + "]\t"; //NON-NLS
148  }
149 
150 }
final TSK_FS_NAME_TYPE_ENUM dirType
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:700
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.