19 package org.sleuthkit.datamodel;
21 import java.util.List;
22 import java.util.ArrayList;
46 return getOSInfoInternal(skCase,
false,
false, 0);
63 return getOSInfoInternal(skCase,
false,
true, fsc.getFileSystemId());
78 return getOSInfoInternal(skCase,
true,
false, 0);
97 private static List<OSInfo> getOSInfoInternal(
SleuthkitCase skCase,
boolean includeBackups,
100 List<OSInfo> infoList =
new ArrayList<OSInfo>();
107 AbstractFile file = skCase.getAbstractFileById(art.getObjectID());
115 if (isBackup && (!includeBackups)) {
120 if (file instanceof FsContent) {
121 FsContent fsc = (FsContent) file;
124 if (restrictFs && (fsId != fsc.getFileSystemId())) {
129 OSInfo newInfo =
new OSInfo(art, isBackup, fsc.getFileSystemId(), file.
getParent());
132 boolean mergedInfo =
false;
133 for (OSInfo info : infoList) {
134 if (info.matches(newInfo)) {
135 info.combine(newInfo);
143 infoList.add(newInfo);
145 }
else if (!restrictFs) {
147 OSInfo newInfo =
new OSInfo(art, isBackup, file.
getParent());
150 boolean mergedInfo =
false;
151 for (OSInfo info : infoList) {
152 if (info.matches(newInfo)) {
153 info.combine(newInfo);
161 infoList.add(newInfo);
static List< OSInfo > getAllOSInfo(SleuthkitCase skCase)
static List< OSInfo > getOSInfo(SleuthkitCase skCase)
static List< OSInfo > getOSInfo(SleuthkitCase skCase, FsContent fsc)