【发布时间】:2012-06-19 12:44:47
【问题描述】:
我正在尝试使用
TZipFile.ZipDirectoryContents()
像这样:
TZipFile.ZipDirectoryContents('Test.PCF', WorkingDir);
如果我没看错,它应该将文件夹“workingdir”的内容保存到名为 Test.pcf 的文件中。
现在当我这样做时,我得到了错误::
Raised exception class EFOpenError with message Cannot open file
...test.pcf. The process cannot access the file because its being used by another process."
有两件事让我感到困惑:
它说它无法打开文件。还没有 test.pcf。我希望这会创造它。
它说无法访问文件。这是因为它还没有创建吗?我在使用这个功能吗?如果是这样,我将如何从文件夹位置创建 zip 文件?
【问题讨论】:
-
同样,我对 TZipFile 不熟悉,但“Test.PCF”是否在您尝试压缩的目录中?