Best way to 'touch' a file?
bokr at oz.net
Wed Aug 24 01:32:54 CEST 2005
On Tue, 23 Aug 2005 08:23:40 -0400, Peter Hansen <peter at engcorp.com> wrote:
>Fredrik Lundh wrote:
>> Peter Hansen wrote:
>>>You've quoted selectively. He also said "Unix-style 'touch'", from
>>>which one could quite legitimately infer
>> nope. read his post again.
>Sigh. You're being tiring, Fredrik:
>'''I'm looking for an easy way to perform a UNIX-style "touch", to
>update the modification time of a file without actually modifying it.'''
>And if your point is that I spelled UNIX in mixed case, and change the
>double quotation marks to single quotation marks, you really need to
>take a break.
>If your point is that this statement *clearly and unambiguously* rejects
>the create-if-missing feature as undesirable, then I can say only that
>you are simply wrong.
OTOH, if I had to bet, I would bet that the part where it says, "... to
update the modification time of a file..." indicates a pre-existing file.
Otherwise it wouldn't be "updating," but just creating a first time-stamp
along with the new file ;-)
At least, that's what I imagine when I see those words. In your favor, I
think the comma after '"touch"' tends to disconnect the purpose that follows,
perhaps even from consciousness, reading quickly. What if the emphasis were changed?
E.g., how would you have interpreted the same words rearranged as follows?
'''I'm looking for an easy way to update the modification time of a file
(to perform a UNIX-style "touch") without actually modifying it.'''
More information about the Python-list