Re: reading a opened file



On Sat, 24 Sep 2005 16:38:23 +0100, nowhere@xxxxxxxxxxxxxx wrote:

<snip>

>>Also it is possible that the other App is sensible and closes the file
>>after writes and then reopens it in order to guarantee flushing.

>>We really need to know more about the other App

>It wouldn't need to close the file - just flush the buffers. There
>are functions to do that.

Actually closing and re-opening is a lot safer
- that guarantees that the Directory entry is updated on FAT systems

FlushFileBuffers buffers does not say anything about updating the
directory entry

Under DOS one used to create a duplicate file handle, then close the
duplicate to force a proper (complete) flush.

With sensitive files I pre-extend them substantially, then close them,
that way one is writing to existing parts of the file
- the application programmer then can optionally close and re-open the
file after update(s).

However that is not really relevant, as we do not know how this App is
writing to the file ( and it will be a bit tricky checking that out,
as I'll bet it was not coded by the OP )
.



Relevant Pages

  • Re: Display contents of text file in the Browser
    ... It sounds like your app is attempting to read from the file at the same time ... that it is writing to it, ... process and attempting to read the file and display it at the same time. ... memory, and return that string to the client, while launching a separate ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Writing to eventlog
    ... > of it is writing to log informations from which table it was readed. ... If your app is running on an intranet server that you or your company ... domain user account and tell your app run under that account. ...
    (microsoft.public.dotnet.framework.aspnet)
  • how to know the parameters of sys_open and sys_unlink system calls of all apps.
    ... I am writing this application that is designed as follows. ... As long as the app is running on the ... Alessandro rubbini's linux device drivers' book with the first couple ... design pointers as to how I accomplish this ...
    (comp.os.linux.development.system)
  • Re: Writing to eventlog
    ... >> end of it is writing to log informations from which table it was readed. ... > a domain user account and tell your app run under that account. ...
    (microsoft.public.dotnet.framework.aspnet)
  • how to know the parameters of sys_open and sys_unlink system calls of all apps.
    ... I am writing this application that is designed as follows. ... As long as the app is running on the ... Alessandro rubbini's linux device drivers' book with the first couple ... design pointers as to how I accomplish this ...
    (comp.os.linux.development.apps)