2 ms·
> You really want to read the directory and map over the stat function (or equivalent) to get the length. Indeed. Equivalent in Ruby: Dir["*"].map { |x| F
by kouteiheika 2y ago
> You really want to read the directory and map over the stat function (or equivalent) to get the length.
Indeed. Equivalent in Ruby:
Dir["*"].map { |x| File.size(x) }
- kazinator 2y agoI avoided (flow (glob "*") (mapcar [chain stat .size])) because * skips entries starting with dot, which sends us down a certain distracting rabbit hole.