Browse Source

Need to override isDirectory for situations where setName has been called

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274749 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
6e2090b71a
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      src/main/org/apache/tools/zip/ZipEntry.java

+ 16
- 0
src/main/org/apache/tools/zip/ZipEntry.java View File

@@ -233,6 +233,15 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable {
platform = PLATFORM_UNIX;
}

/**
* Unix permission.
*
* @since Ant 1.6
*/
public int getUnixMode() {
return (int) ((getExternalAttributes() >> 16) & 0xFFFF);
}

/**
* Platform specification to put into the "version made
* by" part of the central file header.
@@ -404,6 +413,13 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable {
return name == null ? super.getName() : name;
}

/**
* @since 1.10
*/
public boolean isDirectory() {
return getName().endsWith("/");
}

protected void setName(String name) {
this.name = name;
}


Loading…
Cancel
Save