Pavol Babinčák <scroo...@gmail.com> added the comment: 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? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40644> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com