Message369108
Thanks for exhaustive response!
The way how I understand this is it might be beneficial to extend request to get text representation of file attributes on other architectures.
I didn't know about statx() syscall. From what I can tell there is no binary, similar to 'stat', that would print attributes of a file in a text form.
I guess there is no common way to print those attributes from statx()?
---
I see that filemode() works consistently across platforms even on Windows. I guess I could use this everywhere:
stat.filemode(stat.S_IFMT(os.lstat(n).st_mode)
---
And finally modes on Windows won't be ever complete in filemode() because of lack of file modes. I still have some approximation with users' mode (rwx):
format(stat.filemode(stat.S_IMODE(os.lstat(n).st_mode))[1:4]
To get:
r - as readable file or link
w - as not readonly
x - executable by file extension
---
Is that accurate summary? I'm wondering if it would make sense to rename this issue to leave out Windows? |
|
Date |
User |
Action |
Args |
2020-05-17 09:33:18 | scrool | set | recipients:
+ scrool, eryksun |
2020-05-17 09:33:17 | scrool | set | messageid: <1589707997.99.0.792559410017.issue40644@roundup.psfhosted.org> |
2020-05-17 09:33:17 | scrool | link | issue40644 messages |
2020-05-17 09:33:17 | scrool | create | |
|