static ZipEntry fromFile ( String name , File file ) { ZipEntry zipEntry = new ZipEntry ( name ) ; if ( ! file . isDirectory ( ) ) { zipEntry . setSize ( file . length ( ) ) ; } zipEntry . setTime ( file . lastModified ( ) ) ; ZTFilePermissions permissions = ZTFilePermissionsUtil . getDefaultStategy ( ) . getPermissions ( file ) ; if ( permissions != null ) { ZipEntryUtil . setZTFilePermissions ( zipEntry , permissions ) ; } return zipEntry ; }
Create new Zip entry and fill it with associated with file meta - info