-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetCreationTime on Mac (continuation) #49258
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Hey @hamarb123 let's reopen the other issue to keep it simple and preserve all the context in one single place. I'll copy your description from this issue into a comment there. |
@carlossanlop, I'm fine with that, but can you give me permissions. |
@hamarb123 I removed the lock (seems to be a very new bot action). We can continue the conversation there. |
Description
This is based off of my previous issue #39132.
I found a method to make it work that doesn't use obj c apis as I was having issues with setting the attribute on symbolic links in my project using the obj c method, here's the api: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setattrlist.2.html.
I've used this code in my own project for a while now and it seems to work completely fine and I haven't had any issues with it.
I'm happy to share the code as a part of a PR.
It also doesn't require the workaround for setting the modification date to before the creation date that the old code needed from #39132. You can also theoretically set the access time using
ATTR_CMN_ACCTIME
with this api, but I've not found any use in doing so in my code, so I didn't bother to implement it, and there was no issues with the current implementation of set last access time AFAIK on mac.I'd be happy to attempt making a PR if @carlossanlop and/or @jozkee are alright with it.
Also, I'm not sure if it'd work on an M1 mac as I do not have one, but I see no reason why it wouldn't.
The text was updated successfully, but these errors were encountered: