静态方法:zlib.ZipEntry.createSymlink(filename, target[, options])


🌐 Static method: zlib.ZipEntry.createSymlink(filename, target[, options])

  • filename <string> 档案里的条目名称。
  • target <string> 符号链接的目标路径
  • options <Object>
    • comment <string> 一条留言。
    • mode <integer> Unix 权限位。默认值: 0o777。
    • modified <Date> 条目的修改时间。默认: 当前时间。
  • 返回:ZipEntry

创建一个符号链接条目:一个存储的条目,其内容为 target,并且其 Unix 模式类型位将其标记为符号链接,因此当它被读取回时,zipEntry.isSymlink 为 true。支持符号链接条目的提取工具会重建该链接;将 target 视为不可信(参考 zipEntry.name 关于路径安全)。

🌐 Creates a symbolic-link entry: a stored entry whose content is target and whose Unix mode type bits mark it as a symlink, so zipEntry.isSymlink is true when it is read back. Extraction tools that honor symlink entries recreate the link; treat target as untrusted (see zipEntry.name on path safety).