-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add birthtime, blocksize and blks to stat_output for NTFSFilesystemEntry #848
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #848 +/- ##
=======================================
Coverage 75.59% 75.59%
=======================================
Files 311 311
Lines 26561 26569 +8
=======================================
+ Hits 20078 20086 +8
Misses 6483 6483
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
So what do we want to use, the windows style or unix style? Cause I'd prefer them to be consistent across dissect. Regardless what the python docs say. As we change it anyways |
The entire filesystem layer is designed to be consistent with Python since the beginning of Dissect. |
In that case, have we changed that for any other filesystem then? Where the Cause in this current case it seems to only hold for ntfs doesn't it? |
https://github.com/python/cpython/blob/3.12/Modules/posixmodule.c#L2142-L2145 The only thing missing currently is setting Btrfs and other filesystems don't have this, as they actually properly expose all 4 timestamps. |
st_birthtime gets set here right?: https://github.com/python/cpython/blob/aee219f4558dda619bd86e4b0e028ce47a5e4b77/Python/fileutils.c#L1122 where ctime gets changed afterwards at the posixmodule sets it to the value in st_birthtime, which is only used for backwards compatibility. So sure, I'll set the ctime to birthtime for now. And make a note about it for backwards compatibility |
st_block is `0` when the file is resident, as it inside the MFT metadata st_birthtime and st_birthtime_ns now use the creation_time from a MFT Record Other timestamps where incorrectly used, and have been changed: st_mtime: changed from using last_change_time to last_modification_time st_ctime: changed from using creation_time to last_change_time
d5a6364
to
8fd94c0
Compare
In our code. |
which I've done? |
st_block is
0
when the file is resident, as it inside the MFT metadatast_birthtime and st_birthtime_ns now use the creation_time from a MFT Record
Other timestamps where incorrectly used, and have been changed:
st_mtime: changed from using last_change_time to last_modification_time
st_ctime: changed from using creation_time to last_change_time