<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Charles,<br>
<br>
you're right (I assumed you'd find it once you know it's there :-))<br>
<br>
Never had to care about BOM headers, so I didn't know what they are
until I looked them up now. But I read UTF8 files all the time.<br>
Entering bom in the search field yields some methods e.g. in
UTF8TextConverter, I assume that's why I never ran into it. Seems to
'just work' (TM).<br>
<br>
Also there's FileDirectory>>fileNamesMatching: which may help
you with your file names matching.<br>
<br>
Re generators, make a seperate post for a new topic, people may
assume I replied already.<br>
<br>
Or try Squeak dev.<br>
<br>
Cheers,<br>
<br>
Herbert<br>
<br>
<br>
<div class="moz-cite-prefix">Am 21.10.2013 19:14, schrieb Charles
Hixson:<br>
</div>
<blockquote cite="mid:52656105.2040007@earthlink.net" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<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; ">
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 moz-do-not-send="true"
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 moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a>
<a moz-do-not-send="true" 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>
<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>
<br>
</body>
</html>