[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Safe File Update (atomic)



On 30/12/10 17:02, Olaf van der Spek wrote:
On Thu, Dec 30, 2010 at 3:51 PM, Shachar Shemesh<shachar@shemesh.biz>  wrote:
I'm working on one under the MIT license. Will probably release it by the
end of this week. Will also handle copying the permissions over and
following symlinks.
Sounds great!
Got a project page already?
No. I was doing it as code to accompany an article on my company's site about how it should be done. I was originally out to write the article, and then decided to add code. A good thing, too, as recursively resolving symbolic links is not trivial. There is an extremely simple way to do it on Linux, but it will not work on all platforms (the *BSD platforms, including Mac, do not have /proc by default).
What aboue file owner? Meta-data (ACL)?

Olaf

The current code (I'm still working on it, or I would have released it already, but it's about 80% done) does copy owner data over (but ignores failures), but does not handle ACLs. I decided to postpone this particular hot potato until I can get a chance to see how to do it (i.e. - never had a chance on Linux) AND how to do it in a cross-platform way (the code is designed to work on any Posix). Pointers/patches once released are, of course, welcome :-)

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com


Reply to: