Open zoffixznet opened 7 years ago
Please call it nqp::statmulti
to be consistent with the smashcase of all the other nqp::
ops (we only use _i
style suffixes to indicate type).
I was referred here from https://github.com/rakudo/rakudo/issues/2584
From a user-programmer standpoint, it can sometimes be quite nice to retrieve all the stat fields with a single call. For a backup program or an rsync clone, for example, even some of the more esoteric fields (including the raw mode) can be necessary.
If that is already covered by this proposal, then great--I just thought that was worth pointing out explicitly.
Thanks, Corey
I would tailor the new stat_multi as close as possible to the new statx() Linux syscall:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
Especially the flags for requesting information could be used as is:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/include/uapi/linux/stat.h?id=a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
This could simplify the implementation (flags can just be mapped directly) and allow for us to easily extend it to new features introduced in the future. Of course we still must take Windows' features into account, but I guess those can be integrated without much hassle. Especially since the syscall finally can deal with information that has traditionally been available on Windows (and therefore Samba).