[erlang-questions] du in Erlang as a first attempt at an application

Joe Armstrong erlang@REDACTED
Tue Sep 18 16:05:11 CEST 2007

5 lines is a lot - should be one


Since you've got the book you could use lib_find (page 236,237)
file_size_and_type page 233
and a list comprehension or lists:map/2 and lists:sum/1

You get another hint tomorrow if you've not solved it :-)

/Joe Armstrong

On 9/18/07, Jarrod Roberson <jarrod@REDACTED> wrote:
> I am trying to grok how to write a simple 'du' like program that walks
> a directory structure ( not just one but all nested directories ) and
> calculates a sum of all the file sizes. I found some sum() code that I
> understand how that works.
> I have stared at my Programming Erlang book I got a few days ago, and
> stared at the Erlang Cookbook as well as staring and hacking at the
> erlang shell and it just isn't clicking.
> >From what I see, this should be like a 5 line program in Erlang.
> Can anyone provide a working example or point me in the correct direction?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list