ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# C.119 ZipTask The `ZipTask` creates a .zip archive from a fileset or directory. Table C.153:聽Attributes NameTypeDescriptionDefaultRequired`destfile``String`.ZIP filenamen/aYes`basedir``String`Base directory to zip (if no fileset specified, entire directory contents will be included in the archive)noneNo`prefix``String`File path prefix to use when adding files to zipnoneNo`includeemptydirs``Boolean`If set to `true`, also empty directories are copied. `true`No`comment``String`Comment to add to the zip archivenoneNo`ignorelinks``Boolean`Whether to ignore symlinks or not.`false`No **Important note:** using basedir and fileset simultaneously can result in strange contents in the archive. C.119.1 Example ``` <zip destfile="phing.zip"> <fileset dir="."> <include name="**/**" /> </fileset> </zip> ``` The above example uses a fileset to determine which files to include in the archive. `<zip destfile="phing.zip" basedir="."/>`The second example uses the basedir attribute to include the contents of that directory (including subdirectories) in the archive. C.119.2 Supported Nested Tags - `fileset`