Crystal is moving to be supported in non posix plataforms (#3582). But some of the standard library api have posixisms in place, and my proposal is to remove some of them.
File::Stat
represents information about a file and I think it would be best if it was designed to represent this concept and not simply be a direct copy of posix names. Today you do: File.lstat("foo").mtime
and it could be: File.info("foo", follow_links: false).modification_time
. Qt does a similar thing: QFileInfo
.
(Probably there will be more proposals like this)
Perhaps File::Info
suits better? (following the idea of avoid repeating the parent namespace word).
In the case of modification_time
, perhaps modified_time
fits better, since is a bit shorter :wink:
include File::Info
File.new("foo").mtime
I think this is better 馃槃
I think is solved in #5584
Most helpful comment
Perhaps
File::Info
suits better? (following the idea of avoid repeating the parent namespace word).In the case of
modification_time
, perhapsmodified_time
fits better, since is a bit shorter :wink: