-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use Lstat instead of Stat? #3
Comments
Drat. I missed that in the docs. (facepalm) Thanks @djherbis |
One thing to note, times.Get returns only those times that can be obtained by reading the FileInfo object. times.Stat is allowed to do 'extra work' to fetch more times if possible. |
Ah, it is specifically For now, I am ok with just those 2 and just on linux and darwin, so I build my own 2 files. In doing so, I stumbled across your excellent library. |
Yeah ctime should work with Get for linux and darwin, only Windows requires an extra syscall to grab it. I'll add an Lstat method later to make it the same as Stat. |
As a heads up, I added support for times.Lstat a week ago, but I'm waiting on approval to push it. |
Works like a charm. Thank you! |
Any thoughts on using
os.Lstat
instead ofos.Stat
?Stat
tries to follow symlinks, giving the information about the target, as opposed to the file itself. This means:Or maybe have it as an option?
The text was updated successfully, but these errors were encountered: