Getting directory size using ruby

Hi, I want to measure directory size using Ruby. I can use
sys/filesystem gem but I didn't understand from examples how can it
ensure this?

And I musn't do `du -sh directory` so how can I get directory & file
size, can you suggest me something for this?

Thanks.

···

--
Posted via http://www.ruby-forum.com/.

Traverse with Find or Pathname and sum individual sizes.

Cheers

robert

···

On Wed, Jan 22, 2014 at 2:24 PM, Ebru Akagunduz <lists@ruby-forum.com> wrote:

Hi, I want to measure directory size using Ruby. I can use
sys/filesystem gem but I didn't understand from examples how can it
ensure this?

sys-filesystem/examples/example_stat.rb at main · djberg96/sys-filesystem · GitHub

And I musn't do `du -sh directory` so how can I get directory & file
size, can you suggest me something for this?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/