19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.HashSet;
24 import java.util.List;
25 import javax.swing.Action;
26 import org.openide.util.NbBundle;
27 import org.openide.util.Utilities;
39 import org.
sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
48 public static final String
DOTDIR = NbBundle.getMessage(
DirectoryNode.class,
"DirectoryNode.curFolder.text");
57 super(dir, directoryBrowseMode);
64 if (dir.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
65 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/folder-icon-deleted.png");
67 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
80 List<Action> actionsList =
new ArrayList<>();
81 for (Action a : super.getActions(
true)) {
86 NbBundle.getMessage(
this.getClass(),
"DirectoryNode.getActions.viewFileInDir.text"),
this));
87 actionsList.add(null);
89 actionsList.add(
new NewWindowViewAction(NbBundle.getMessage(
this.getClass(),
"DirectoryNode.viewInNewWin.text"),
this));
91 actionsList.add(null);
94 actionsList.add(null);
96 actionsList.add(null);
99 final Collection<AbstractFile> selectedFilesList =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
100 if (selectedFilesList.size() == 1) {
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()