检查文件是否已完全保存(由其他应用程序保存) [英] To check the file is saved completely or not (by other application)

查看:102
本文介绍了检查文件是否已完全保存(由其他应用程序保存)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

我遇到一种情况,应用程序会将图像文件保存在特定目录中.我需要找出图像文件是否已完全保存.无法修改该应用程序以引发事件或将消息传递给我的应用程序.我需要观察目录并找出图像是否被完全复制.

快速响应表示赞赏.
提前致谢. :)

Hi..

I have a situation where an application will save an image file in a specific directory. I need to find out whether or not the image file is saved completely. The application can not be modified to fire an event or pass a message to my application. I need to observe the directory and find out whether the image is copied fully or not.

Quick response is appreciated.
Thanks in advance. :)

推荐答案

您想使用FileSystemWatcher对象进行研究.在CodeProject上有很多关于它的文章.
You want to look into using the FileSystemWatcher object. There are a lot of articles here on CodeProject about it.


如果文件被完全保存,
可以在写入模式下打开它(由您的应用程序...):-D
If a file is saved completely,
it can be opened (by your app) in write-mode... :-D


这篇关于检查文件是否已完全保存(由其他应用程序保存)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆