Walk directory of files?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Walk directory of files?

Charles Hixson-2
What is the best way to walk a directory of files?
It would be nice is I could just:
Get next file?
exitst?  ifFalse then done
match pattern?  ifFalse, then go to first step
return file

This requires that the method track where I am.  I think I can figure
out how to stuff them into a collection, and return the entire
collection of matched files, and perhaps that's the right answer, but
that's not the way I would do it in Python or Ruby, so perhaps it's also
not the way to do it in Smalltalk.

Also, if it matters, the files will be utf-8 files, many of them with
BOMs. (Well, not really BOMs, since it's utf8, but the utf8 header.)  
Does Squeak recognize BOM headers?

--
Charles Hixson

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners