I think with rename/move you can accomplish that in a way, however it has its limitations.
Rune
On 04/13/2010 10:02 AM, Adam Badura wrote:To clarify this. Your application is made up from several processes and
>>> 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.
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@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users