|
-
October 6th, 2002, 07:39 AM
#1
how to check file modification time?
I want to watch a file which it will be modified by another application,if this file has been modified then i'll open the file and read it.
i coudln't find any existed code on the internet to solve this problem,so i tried by myself,but i couldn't find the function that can read the date/time stamp of the file.
if you have any idea about preprogrammed code or about the function that check the date/time of the file please answer me as soon as possible.
thank you in advance.
Yaser...
-
October 6th, 2002, 10:46 AM
#2
This isn't something that C++ covers by itself. So, you'll have to
use some operating system dependent method. Here's a link
which could be helpful to you if you're on Windows machines:
http://msdn.microsoft.com/library/de...onbyhandle.asp
If you're on a unix machine, sadly, I don't know the answer.
--Paul
-
October 6th, 2002, 11:49 AM
#3
You can use stat on the filename on startup and run stat on it at specified intervals. The information returned by stat will give you the modification date/time. If you are using Windows, stat is called _stat.
Succinct is verbose for terse
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|