copy-file does not preserve file attributes on linux version of Racket...
22 views
Skip to first unread message
Don Green
unread,
May 10, 2021, 8:16:53 PM5/10/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Racket Users
From Racket doc: "File
permissions are transferred from src to dest; on Windows,
the modification time of src is also transferred to dest."
Is the above line meant to imply that a unix/linux version of Racket will NOT preserve file attributes using copy-file?
George Neuner
unread,
May 10, 2021, 10:31:30 PM5/10/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Don Green, racket users
I don't know the answer to your question re: Racket's copy-file, but I
would point out that in the OS the create, modify, and access times for
files all are maintained separately. A program (with sufficient rights)
can change them independently.
Matthew Flatt
unread,
May 11, 2021, 7:18:46 AM5/11/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Don Green, Racket Users
Yes, that's right.
The intent is to mirror the most common convention for file copies on
each platform. On Unix, `cp` sets the copied file's timestamp to the
current time. On Windows, `copy` gives the copy the original file's
timestamp. (These conventions are also reflected by the system APIs
that racket uses.)