We have a file that is an extract file that represents data from several
different systems (main frame, etc). This data varies and so from day to day
the file that gets generated has variant size of data. Sometimes is just 5
meg, other times is can be 10 gig. This means that the time it takes for the
file to be completed varies also. In other words it is un-predictable what
the size will be.
Now, the problem is, when the file is complete we need to kick off another
process that parses the file as well as other tasks that are not related but
can not kick off until the file is done being generated.
So, how do we know the file is done being written? The app that generates
the file is a 3rd party and is no-longer supported by the vendor.
I've considered writting code that will attempt to open the file and if the
app still has a lock on it then an exception will get thrown and voila we
know it isn't done yet. That however, is un-acceptable jerry rigging. This
needs to be production worthy code and done properly.
So my question to you guys, in C#, what sort of solution would you provide
the problem of knowing when the file is done?
--
-Brycen
different systems (main frame, etc). This data varies and so from day to day
the file that gets generated has variant size of data. Sometimes is just 5
meg, other times is can be 10 gig. This means that the time it takes for the
file to be completed varies also. In other words it is un-predictable what
the size will be.
Now, the problem is, when the file is complete we need to kick off another
process that parses the file as well as other tasks that are not related but
can not kick off until the file is done being generated.
So, how do we know the file is done being written? The app that generates
the file is a 3rd party and is no-longer supported by the vendor.
I've considered writting code that will attempt to open the file and if the
app still has a lock on it then an exception will get thrown and voila we
know it isn't done yet. That however, is un-acceptable jerry rigging. This
needs to be production worthy code and done properly.
So my question to you guys, in C#, what sort of solution would you provide
the problem of knowing when the file is done?
--
-Brycen
Comment