19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.Collections;
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;
41 import org.
sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
52 public static final String
DOTDIR = NbBundle.getMessage(
DirectoryNode.class,
"DirectoryNode.curFolder.text");
61 super(dir, directoryBrowseMode);
68 if (dir.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
69 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/folder-icon-deleted.png");
71 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
84 List<Action> actionsList =
new ArrayList<>();
85 for (Action a : super.getActions(
true)) {
90 NbBundle.getMessage(
this.getClass(),
"DirectoryNode.getActions.viewFileInDir.text"),
this));
91 actionsList.add(null);
93 actionsList.add(
new NewWindowViewAction(NbBundle.getMessage(
this.getClass(),
"DirectoryNode.viewInNewWin.text"),
this));
95 actionsList.add(null);
97 actionsList.add(null);
99 actionsList.add(null);
102 final Collection<AbstractFile> selectedFilesList =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
103 if (selectedFilesList.size() == 1) {
108 return actionsList.toArray(
new Action[actionsList.size()]);
112 public <T> T accept(ContentNodeVisitor<T> v) {
113 return v.visit(
this);
117 public <T> T accept(DisplayableItemNodeVisitor<T> v) {
118 return v.visit(
this);
DirectoryNode(Directory dir)
static final String DOTDIR
static final Logger LOGGER
static final String DOTDOTDIR
DirectoryNode(AbstractFile dir, boolean directoryBrowseMode)
void setIcon(AbstractFile dir)
Action[] getActions(boolean popup)
boolean directoryBrowseMode
static synchronized DeleteFileContentTagAction getInstance()
synchronized static Logger getLogger(String name)
static ViewFileInTimelineAction createViewFileAction(AbstractFile file)
static synchronized AddContentTagAction getInstance()
boolean getDirectoryBrowseMode()