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?
>
> https://github.com/djberg96/sys-filesystem/blob/ffi/examples/example_stat.rb
>
> And I musn't do `du -sh directory` so how can I get directory & file
> size, can you suggest me something for this?

Traverse with Find or Pathname and sum individual sizes.

Cheers

robert


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