Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: utime for symbolic links

by haukex (Bishop)
on Apr 15, 2020 at 17:03 UTC ( #11115584=note: print w/replies, xml ) Need Help??


in reply to utime for symbolic links

Apparently, what touch(1) uses internally is utimensat(2). I haven't found anything on CPAN yet* that directly supports what you want to do, but in theory, you could use FFI::Platypus to link to it. Time::HiRes's utime does use utimensat, but doesn't support setting the AT_SYMLINK_NOFOLLOW flag needed to modify the symlink instead of the file it points to.

* Update: See here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11115584]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2021-10-28 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?