<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 10/21/2013 02:07 AM, Herbert König
wrote:<br>
</div>
<blockquote
cite="mid:j87ex6b3glfmjutxpm22xyyi.1382346441374@email.android.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
Hi Charles,
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>Cheers</div>
<div>Herbert</div>
<br>
<br>
<br>
-------- Ursprüngliche Nachricht --------<br>
Von: Charles Hixson <a class="moz-txt-link-rfc2396E" href="mailto:charleshixsn@earthlink.net"><charleshixsn@earthlink.net></a> <br>
Datum: 21.10.2013 9:14 (GMT+01:00) <br>
An: <a class="moz-txt-link-abbreviated" href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a> <br>
Betreff: [Newbies] Walk directory of files? <br>
<br>
<br>
What is the best way to walk a directory of files?<br>
It would be nice is I could just:<br>
Get next file?<br>
exitst? ifFalse then done<br>
match pattern? ifFalse, then go to first step<br>
return file<br>
<br>
This requires that the method track where I am. I think I can
figure <br>
out how to stuff them into a collection, and return the entire <br>
collection of matched files, and perhaps that's the right answer,
but <br>
that's not the way I would do it in Python or Ruby, so perhaps
it's also <br>
not the way to do it in Smalltalk.<br>
<br>
Also, if it matters, the files will be utf-8 files, many of them
with <br>
BOMs. (Well, not really BOMs, since it's utf8, but the utf8
header.) <br>
Does Squeak recognize BOM headers?<br>
<br>
-- <br>
Charles Hixson<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Beginners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a>
</pre>
</blockquote>
I think that means I should use<br>
Files-Directories : FileDirectory : fullNamesOfAllFilesInSubtree<br>
and store the collection as I walk through the files processing them
rather than use what Python would call a generator.<br>
<br>
Do you know whether when reading a utf8 file the BOM is recognized?
Or do I need write a handler to strip it off?<br>
<pre class="moz-signature" cols="72">--
Charles Hixson</pre>
</body>
</html>