我如何知道进程(即我的应用程序)当前打开了哪些文件?

发布于 2024-08-29 08:30:51 字数 193 浏览 1 评论 0原文

我正在使用 Lucene.Net 索引,并希望为用户提供移动索引的选项,但在关闭索引以便移动目录/内容时遇到问题(我不断收到访问被拒绝的异常)。我需要能够获得更多信息,以便能够调试此问题,例如能够知道当前打开了哪些文件,以及有关每次使用的尽可能多的信息。

或者,有没有什么方法可以简单地强制关闭一堆文件以便移动它们?这将使事情更容易解决。

I am using a Lucene.Net index and want to give the user an option to move the index, but am having trouble closing it down so the directory/contents can be moved (I keep getting access denied exceptions). I need to be able to have some more information so I can debug this problem, such as being able to tell what files are currently open, and as much information about each use as possible.

Alternatively, is there any way to simply force close a bunch of files so they can be moved? This would make things a lot easier to solve.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

往日 2024-09-05 08:30:51

您可以使用 Process Explorer 找出哪个进程打开了文件。

You can use Process Explorer to find out which process has opened a file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文