19 package org.sleuthkit.autopsy.coreutils;
22 import java.util.ArrayList;
23 import java.util.Collections;
24 import java.util.List;
26 import org.openide.util.NbBundle;
77 public JLNK(
int header, byte[] linkClassIdentifier,
int linkFlags,
78 int fileAttributesFlags,
long crtime,
long atime,
79 long mtime,
int fileSize,
int iconIndex,
int showCommand,
short hotKey,
80 List<String> linkTargetIdList,
81 boolean hasUnicodeLocalBaseAndCommonSuffixOffset,
82 String localBasePath, String commonPathSuffix, String localBasePathUnicode,
83 String commonPathSuffixUnicode, String name, String relativePath,
84 String workingDir, String arguments, String iconLocation,
int driveSerialNumber,
86 int commonNetworkRelativeListFlags,
88 String netName, String netNameUnicode, String deviceName,
89 String deviceNameUnicode) {
91 this.linkClassIdentifier = linkClassIdentifier.clone();
92 this.linkFlags =
new ArrayList<>();
93 for (LnkEnums.LinkFlags enumVal : LnkEnums.LinkFlags.values()) {
94 if ((linkFlags & enumVal.getFlag()) == enumVal.getFlag()) {
95 this.linkFlags.add(enumVal);
98 this.fileAttributesFlags =
new ArrayList<>();
99 for (LnkEnums.FileAttributesFlags enumVal : LnkEnums.FileAttributesFlags.values()) {
100 if ((fileAttributesFlags & enumVal.getFlag()) == enumVal.getFlag()) {
101 this.fileAttributesFlags.add(enumVal);
125 this.commonNetworkRelativeListFlags =
new ArrayList<>();
126 for (LnkEnums.CommonNetworkRelativeLinkFlags enumVal : LnkEnums.CommonNetworkRelativeLinkFlags.values()) {
127 if ((commonNetworkRelativeListFlags & enumVal.getFlag()) == enumVal.getFlag()) {
128 this.commonNetworkRelativeListFlags.add(enumVal);
144 return Collections.unmodifiableList(commonNetworkRelativeListFlags);
180 return Collections.unmodifiableList(fileAttributesFlags);
200 return Collections.unmodifiableList(linkTargetIdList);
212 return linkClassIdentifier.clone();
216 return Collections.unmodifiableList(linkFlags);
268 if (localBasePathUnicode != null && !localBasePathUnicode.isEmpty()) {
269 if (commonPathSuffixUnicode != null) {
271 }
else if (commonPathSuffix != null) {
274 }
else if (localBasePath != null && !localBasePath.isEmpty()) {
275 if (commonPathSuffixUnicode != null) {
277 }
else if (commonPathSuffix != null) {
280 }
else if (netNameUnicode != null && !netNameUnicode.isEmpty()) {
281 if (commonPathSuffixUnicode != null && !commonPathSuffixUnicode.isEmpty()) {
283 }
else if (commonPathSuffix != null && !commonPathSuffix.isEmpty()) {
286 }
else if (netName != null && !netName.isEmpty()) {
287 if (commonPathSuffixUnicode != null && !commonPathSuffixUnicode.isEmpty()) {
289 }
else if (commonPathSuffix != null && !commonPathSuffix.isEmpty()) {
292 }
else if (linkTargetIdList != null && !linkTargetIdList.isEmpty()) {
294 for (String s : linkTargetIdList) {
295 if (s.endsWith(
"\\")) {
298 if (ret.endsWith(
"\\")) {
308 return NbBundle.getMessage(this.getClass(),
"JLNK.noPrefPath.text");
int getDriveSerialNumber()
final String commonPathSuffixUnicode
final String netNameUnicode
String getNetNameUnicode()
boolean isHasUnicodeLocalBaseAndCommonSuffixOffset()
NetworkProviderType getNetworkProviderType()
final String deviceNameUnicode
List< String > getLinkTargetIdList()
JLNK(int header, byte[] linkClassIdentifier, int linkFlags, int fileAttributesFlags, long crtime, long atime, long mtime, int fileSize, int iconIndex, int showCommand, short hotKey, List< String > linkTargetIdList, boolean hasUnicodeLocalBaseAndCommonSuffixOffset, String localBasePath, String commonPathSuffix, String localBasePathUnicode, String commonPathSuffixUnicode, String name, String relativePath, String workingDir, String arguments, String iconLocation, int driveSerialNumber, DriveType driveType, String volumeLabel, int commonNetworkRelativeListFlags, NetworkProviderType networkProviderType, boolean unicodeNetAndDeviceName, String netName, String netNameUnicode, String deviceName, String deviceNameUnicode)
byte[] getLinkClassIdentifier()
final List< String > linkTargetIdList
String getLocalBasePath()
final String commonPathSuffix
List< LinkFlags > getLinkFlags()
List< CommonNetworkRelativeLinkFlags > getCommonNetworkRelativeListFlags()
final List< CommonNetworkRelativeLinkFlags > commonNetworkRelativeListFlags
String getLocalBasePathUnicode()
String getCommonPathSuffixUnicode()
String getCommonPathSuffix()
final String localBasePathUnicode
final int driveSerialNumber
final List< LinkFlags > linkFlags
final boolean unicodeNetAndDeviceName
final String localBasePath
final String relativePath
final boolean hasUnicodeLocalBaseAndCommonSuffixOffset
final DriveType driveType
final NetworkProviderType networkProviderType
final String iconLocation
final List< FileAttributesFlags > fileAttributesFlags
List< FileAttributesFlags > getFileAttributesFlags()
boolean isUnicodeNetAndDeviceName()
final byte[] linkClassIdentifier
String getDeviceNameUnicode()