suhail
suhail

Reputation: 360

difference between data writing to existing file and copy entire content from another in C#

I have developed one windows application,which is checking for newly updated or generated file in a directory and copying the data to a temporary file.My application is doing its job perfectly.But,There is one third party application "POS Text Sender",which will read all the text from a temporary file and display on CCTV Camera if i use notepad text editor to copy data.But when my application does this work,POS Text Sender will read the contents from first file and its also trace the updated contents of that file from time to time.Once New file is generated in that directory,as usual,my application will copy the entire contents of that file to temporary file,but POS Text sender will not read that data and then if it has to display any contents,I should restart POS Text Sender.I really dont know how POS Text Sender knows that my application is copying from newly generated file and how to get it stopped.What is the difference between data writing to existing file and copy entire content from another

Upvotes: 0

Views: 293

Answers (1)

McGarnagle
McGarnagle

Reputation: 102723

What is the difference between data writing to an existing file and copying the entire contents from another?

It sounds like maybe the 3rd-party app is looking at either the created or modified date stamp on the files, and not taking both into account. The difference is as follows:

  • when you create a new file, created and modified will be the same
  • when you edit an existing file, modified will be later than created
  • when you copy an existing file, the new file's created will be later than its modified timestamp

Upvotes: 1

Related Questions