[Python-bugs-list] [ python-Feature Requests-623782 ] os.utime() that works on symlinks?

noreply@sourceforge.net noreply@sourceforge.net
Mon, 04 Nov 2002 02:17:18 -0800


Feature Requests item #623782, was opened at 2002-10-15 23:47
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=623782&group_id=5470

Category: None
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Rob Landley (landley)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.utime() that works on symlinks?

Initial Comment:
I can query a symlink's timestamps with os.lstat(), but can't 
set them.  Any attempt to set the timestamps on a symlink is 
transparently redirected to the file it points to (which in this 
case is on a read-only partition, as is not what I want to do 
anyway).

Maybe os.lutime()?


----------------------------------------------------------------------

>Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-04 11:17

Message:
Logged In: YES 
user_id=21627

It's not possible to implement this feature: the operating
system provides no mechanism to modify the timestamp of a
symlink. The closest you can get is to remove and recreate
the symlink, but that uses the current time, not the one you
would give to utime.

----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2002-10-16 00:10

Message:
Logged In: YES 
user_id=45365

Is there a way to do this from a C program? os.utime() is simply a wrapper around the C library call of the same name, and I'm not aware of a lutime() on systems I'm familiar with...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=623782&group_id=5470