[Lazarus] tail on windows

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jul 19 20:09:37 CEST 2010


On Mon, 19 Jul 2010 09:53:34 +0400
dmitry boyarintsev <skalogryz.lists at gmail.com> wrote:

> On Mon, Jul 19, 2010 at 4:23 AM, Marc Weustink <marc at dommelstein.net> wrote:
> > You need to make sure a file exists. IIRC it is not possible to create a
> > file for sharing, you can only open a file sharable
> 
> It's possible. at least the following example did work on Windows.
> 
> begin
>   filemode:=fmShareDenyNone;
>   assign(f, 'c:\test.txt'); rewrite(f);
>   writeln(f,'test');
>   writeln('press enter to unlock file');
>   readln;
>   close(f);
> end.
> 
> The newly created c:\test.txt was sharable.
> 
> AFAIK, it's "impossible" for TFileStream using fmCreate flag. fmCreate
> flag causes a file to be re-created without sharing (at Windows).

Can you create a new patch?

Mattias




More information about the Lazarus mailing list