public void build(Array<FileHandle> favorites, FileHandle file) { this.file = file; clearChildren(); addItem(newDirectory); addSeparator(); if (file.type() == FileType.Absolute || file.type() == FileType.External) addItem(delete); if (file.type() == FileType.Absolute) { addItem(showInExplorer); if (file.isDirectory()) { if (favorites.contains(file, false)) addItem(removeFromFavorites); else addItem(addToFavorites); } } }
public FileHandleData(FileHandle file) { type = file.type(); path = file.path(); }