/** * Returns the existence of the given entry name * The file name must be relative to the root of the module. * * @param name the file name relative to the root of the module. * @return the existence the given entry name. */ public boolean exists(String name) throws IOException { return getJarEntry(name)!=null; }
/** * Returns true if the entry is a directory or a plain file * @param name name is one of the entries returned by {@link #entries()} * @return true if the entry denoted by the passed name is a directory */ public boolean isDirectory(String name) { JarEntry entry = getJarEntry(name); if (entry==null) { throw new IllegalArgumentException(name); } return entry.isDirectory(); }