The latter already exists. I tried to use File.empty?
and then thought it would not exist, but the code
already exists, it is just called File.zero? instead.
I added a comment on issue #10121 before knowing this specific issue already existed.
I just wanted to say that, with the arrival of Dir.empty?, I like the idea of the File.empty? alias for the reason of having some symmetry between Dir and File methods.
For the sake of consistency could you also add Pathname#empty?. Alternatively maybe add both Pathname#empty_file? and Pathname#empty_directory?. It is probably important to keep Pathname consistent with File and/or Dir since the tool is much less useful if you sometimes have to fallback to File or Dir for certain use cases
The latter already exists. I tried to use File.empty?
and then thought it would not exist, but the code
already exists, it is just called File.zero? instead.