AW: [Newbies] Walk directory of files?

Herbert König herbertkoenig at gmx.net
Mon Oct 21 09:07:21 UTC 2013


Hi Charles,

No Squeak handy but there is a allfilesinalldirectories. This will give you all files in all subfolders. Tonight I will look up the real name but you may be able to find it in FileStream or similar yourself. 

Cheers
Herbert

-------- Ursprüngliche Nachricht --------
Von: Charles Hixson <charleshixsn at earthlink.net> 
Datum: 21.10.2013  9:14  (GMT+01:00) 
An: beginners at lists.squeakfoundation.org 
Betreff: [Newbies] Walk directory of files? 
 
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
Beginners at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20131021/ae5e3133/attachment.htm


More information about the Beginners mailing list