19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.Arrays;
23 import java.util.Collection;
24 import java.util.HashSet;
25 import java.util.List;
26 import javax.swing.Action;
27 import org.openide.util.NbBundle;
28 import org.openide.util.Utilities;
40 import org.
sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
49 public static final String
DOTDIR = NbBundle.getMessage(
DirectoryNode.class,
"DirectoryNode.curFolder.text");
58 super(dir, directoryBrowseMode);
65 if (dir.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
66 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/folder-icon-deleted.png");
68 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
81 List<Action> actionsList =
new ArrayList<>();
84 NbBundle.getMessage(
this.getClass(),
"DirectoryNode.getActions.viewFileInDir.text"),
this));
85 actionsList.add(null);
87 actionsList.add(
new NewWindowViewAction(NbBundle.getMessage(
this.getClass(),
"DirectoryNode.viewInNewWin.text"),
this));
89 actionsList.add(null);
92 actionsList.add(null);
94 actionsList.add(null);
97 final Collection<AbstractFile> selectedFilesList =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
98 if (selectedFilesList.size() == 1) {
103 actionsList.add(null);
104 actionsList.addAll(Arrays.asList(super.getActions(
true)));
105 return actionsList.toArray(
new Action[actionsList.size()]);
109 public <T> T accept(ContentNodeVisitor<T> visitor) {
110 return visitor.visit(
this);
114 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
115 return visitor.visit(
this);
DirectoryNode(Directory dir)
static final String DOTDIR
static final String DOTDOTDIR
DirectoryNode(AbstractFile dir, boolean directoryBrowseMode)
void setIcon(AbstractFile dir)
Action[] getActions(boolean popup)
static synchronized ExportCSVAction getInstance()
boolean directoryBrowseMode
static synchronized DeleteFileContentTagAction getInstance()
static ViewFileInTimelineAction createViewFileAction(AbstractFile file)
static synchronized AddContentTagAction getInstance()
boolean getDirectoryBrowseMode()