|
Boost Users : |
Subject: Re: [Boost-users] [Filesystem] Locking files
From: Rune Lund Olesen (rune.olesen_at_[hidden])
Date: 2010-04-13 05:22:52
I think with rename/move you can accomplish that in a way, however it has
its limitations.
Rune
On Tue, Apr 13, 2010 at 10:46 AM, Frank Meerkötter <frank_at_[hidden]>wrote:
> On 04/13/2010 10:02 AM, Adam Badura wrote:
> >>> Is it possible to lock a file with Boost.Filesystem to prevent its
> >>> deletion, writing or reading?
> >>>
> >>
> >> Against whom/what do you want to lock the file? On which platform?
> >
> > Against other processes will suffice I guess. On Windows platform,
> > however using Boost.Filesystem I hope for (at least some) platform
> > independence.
>
> To clarify this. Your application is made up from several processes and
> you want to implement locking between those or do you want to lock
> against completely unrelated processes?
>
> For the first case you can use boost.interprocess for the second case i
> don't see a portable solution as for example POSIX systems are
> implementing advisory locking (as opposed to mandatory locking on
> Windows). On such system you can only have locking between cooperating
> processes which are obeying to a locking protocol.
>
> Frank
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net