Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在做的是尝试使用 rubyzip 打开一个空白 docx,但我不断收到错误消息:
Zip::Error: File /b;a/bla/bla/existing_file.docx not found
rubyzip 中是否有防止打开空 zipfile 的规则?
rubyzip仅支持压缩现有文件。您可以做的是使用 创建一个空文件touch,然后将其压缩。
rubyzip
touch
require "fileutils" FileUtils.touch '/b;a/bla/bla/existing_file.docx'