Re: walk_dir issue
- Posted by "Juergen Luethje" <j.lue at gmx.de> Nov 25, 2004
- 500 views
Robert Craig wrote: > Juergen Luethje wrote: >> That was not my question. My point was, that when we do e.g. >> }}} <eucode> >> ? walk_dir("C:\\*.txt", routine_id("look_at"), 0) >> </eucode> {{{ >> >> -- as I wrote above -- then something happens, that Derek and I >> consider a bug. > > I'm not sure why this is a bug. > You are supposed to specify a single directory for walk_dir() > to walk. You are instead specifying a bunch of txt files. > How can you complain about what happens next? Do you > want walk_dir() to analyse the path you give it, and spit out > an error message? It depends on what you actually want walk_dir() to do. a) According to the current documentation, the first parameter should be a path name. At least on DOS and Windows, something that contains a wildcard is not a valid path name. Yes, if the first parameter actually is supposed to be a path name, then I would expect that the user-defined routine would not be called at all because no such directory as "C:\\*.txt" exists, and that walk_dir() spits out an error message. b) On the other hand, if it is intended that the first parameter of walk_dir() may contain wildcards, then the documentation should be changed accordingly. And the walk_dir() function must be changed, so that -- regarding my previous example -- onyly "C:" is given to the user-defined function as the path name, rather than "C:\\*.txt", because "C:\\*.txt" is not a path name. Regards, Juergen -- Have you read a good program lately?