On Apr 3, 2010, at 2:20 AM, Brice Figureau wrote:
Hi,
In the course of this slow (less than 5 minutes of spare time a day
doesn't help things being done) work, I found that file metadata
doesn't
contain file size.
It's not that we actually really need it, but it would help greatly
when
writing sourced files (for instance it would help us know if we need
to
write in a temp file and rename or not).
This brings another question, is why in File#write we don't use a
temporary file if the created file is 0 bytes long?
If I change the file metadata API/pson format, what would be the
implication for compatibility, and do we care?
It looks like any unknown options that the client receives will cause
a failure, so yeah, it looks like that will break backward
compatibility.
I definitely like the idea of adding this, but I don't really know how
to add it without breaking everything.
As to why we don't use a temp file when writing empty files, I
basically assumed this would only happen when creating a file anew
(i.e., I assumed we weren't replacing files) and that it was
essentially atomic already, so adding further atomicity wasn't
valuable. I'm fine with that special case getting removed.
--
Chase after truth like hell and you'll free yourself, even though
you never touch its coat-tails. -- Clarence Darrow
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To post to this group, send email to puppet-...@googlegroups.com.
To unsubscribe from this group, send email to
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.