TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
christoff
NA
6
0
Question about using DirectoryInfo for real LastWriteTime
Oct 16 2006 10:38 PM
Hello, I'm currently writing an application, part of which involves watching a target directory, and sending notification to the main interface when a subdirectory is dropped into this target directory. However, I'm running into a slight issue which I'm hoping someone here can clarify for me.
The snag that I'm running into is that before I can call the code to process these subfolders, I need to be sure that they have been completely finished being sent. In the code that I have in place now I use this:
if (dir.LastWriteTime.AddSeconds(5) < DateTime.Now)
This code doesn't seem to be reliable if files inside the folder are taking a long time to copy. Does the LastWriteTime property not check the files within the directory to see what time they were last accessed? Does it check the files inside that particular directory, but not the subdirectories inside? I couldn't really glean the information from the SDK, so I figured that I would ask here and see if anyone could clear this up.
Thanks in advance, Christoff
Reply
Answers (
0
)
How to arrange the Add-in menu item?
How to Get UNC Path of Mapped Drive!