有谁知道如何在 erlang 中解压受密码保护的文件
有 3 个问题
- 如何在 erlang 中解压缩或打开受密码保护的 zip 文件?
- 解压 zip 文件后,按扩展名对所有文件进行排序,例如 filelib:wildcard("*.?erl")?
- 将所有排序的文件放在不同的文件中,即 file:write(all *.erl -> to erlfile) 和 file:write(all *.beam -> to beamfile)
谢谢
Have 3 questions
- how to unzip or open a password protected zip file in erlang?
- after unziping the zip file, sorting all files by extention some thing like filelib:wildcard("*.?erl")?
- put all sorted files i different files i.e file:write(all *.erl -> to erlfile) and file:write(all *.beam -> to beamfile)
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至于1.,我认为你不容易做到这一点。您必须调用一些外部脚本并通过端口观察其行为。
对于2,您可以执行以下操作:
对于3,如果空间没有问题,则将它们全部读入内存,将数据收集到iolist()中并将该数据写回所需的输出文件。如果空间是个问题,您需要稍微流式传输数据并分块读取。
As for 1., I don't think you can do that easily. You have to call some external script and observe its behaviour through a port.
As for 2, you can do the following:
As for 3, if space is no problem, then read all of them into memory, gather the data in an iolist() and write that one back to the desired output file. If space is a problem you need to stream data a bit and read in chunks.