|
-
January 10th, 2011, 04:44 PM
#1
Reading file that is being writen by another app
Hi,
little explanation of my problem:
there is an third party app, that i have no control of.
this app writes log file, but its not : write all, then close file, its writing when something happen,
app does not exclusively lock file
i want to be notified whenever that app writes something to file and read new content
is there any proper way of dealing with that kind of situation ?
1) i have tried FileSystemWatcher, to check if files was changed, but it notifies me only on app opening/closing file, not on every write
2) i am able to read file just the way i want using FileStream.BeginRead, but its using 100% cpu,
and spams read operations like crazy, i can successfully lower cpu usage by Thread.Sleep, but i think its not what async operations are for ?
any advice is appreciated
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
|