return stat;
}
public FuseDirEnt[] getdir(String path) throws FuseException
{
Node node = tree.lookupNode(path);
ZipEntry entry = null;
if (node == null || (entry = (ZipEntry)node.getValue()) == null)
throw new FuseException("No Such Entry").initErrno(FuseException.ENOENT);
if (!entry.isDirectory())
throw new FuseException("Not A Directory").initErrno(FuseException.ENOTDIR);
Collection children = node.getChildren();
FuseDirEnt[] dirEntries = new FuseDirEnt[children.size()];
int i = 0;
for (Iterator iter = children.iterator(); iter.hasNext(); i++)
{
Node childNode = (Node)iter.next();
ZipEntry zipEntry = (ZipEntry)childNode.getValue();
FuseDirEnt dirEntry = new FuseDirEnt();
dirEntries[i] = dirEntry;
dirEntry.name = childNode.getName();
dirEntry.mode = zipEntry.isDirectory()? FuseFtype.TYPE_DIR : FuseFtype.TYPE_FILE;
}
return dirEntries;
}