question about intended function of filelib:wildcard/2

Bengt Kleberg bengt.kleberg@REDACTED
Tue Apr 12 16:12:08 CEST 2005


greetings,

this is what the manual says:

        wildcard(Wildcard, Cwd) -> list()

               Types  Wildcard = filename() | dirname()
                      Cwd = dirname()

               The wildcard/2  function  works  like  wildcard/1, 
except  that
               instead of the actual working dirctory, Cwd will be used.


i thought this would mean that the following 2 calls would give me the 
same result:

  filelib:wildcard("/home/eleberg/*").
  filelib:wildcard("*", "/home/eleberg").


on my system they return very different lists.

could somebody please explain if they should be different, and how 
wildcard/2 is supposed to be used.

or, what i am doing wrong.


bengt



More information about the erlang-questions mailing list