private GraphNode createEntryNode(ZipEntry entry) {
if (entry.isDirectory()) {
// Ensure directory name is in canonical form
String dirName = new File(entry.getName()).getPath();
return new DirectoryElement(dirName);
}
return new FileElement(entry.getName());
}