Skip to content
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

Closed
hamarb123 opened this issue Mar 6, 2021 · 4 comments
Closed

SetCreationTime on Mac (continuation) #49258

hamarb123 opened this issue Mar 6, 2021 · 4 comments

Comments

@hamarb123
Copy link
Contributor

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.

@dotnet-issue-labeler
Copy link

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.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 6, 2021
@carlossanlop
Copy link
Member

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 carlossanlop removed the untriaged New issue has not been triaged by the area owner label Mar 11, 2021
@hamarb123
Copy link
Contributor Author

hamarb123 commented Mar 11, 2021

@carlossanlop, I'm fine with that, but can you give me permissions.
Thanks.
On the other issue:
image

@carlossanlop
Copy link
Member

@hamarb123 I removed the lock (seems to be a very new bot action). We can continue the conversation there.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants