Directory enumeration

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

Directory enumeration

Stephen-71
I'm doing some Directory enumeration.

The method "filesMatching: aPattern do: block" returns File objects
including files and directories.

The method "allFilesMatching: aPattern do: aBlock" only returns File
objects that are files. There are no directories in the enumeration.

The documentation doesn't say that the recursive method will only return
files and not return directories. Is this a bug or is it just the
documentation not up to date?

It would be great if in fact the recursive method returned files and
directories.

Thanks
Stephen


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Directory enumeration

S11001001
On Sat, 2007-12-01 at 12:20 +1300, Stephen wrote:
> The documentation doesn't say that the recursive method will only return
> files and not return directories. Is this a bug or is it just the
> documentation not up to date?

From NEWS for 2.95+:

o   Directory entries are passed to #allFilesMatching:do:'s block argument
    if they match aPattern.  As before, the function descends in all the
    directories, even those that do not match aPattern.

Which was done in response to an earlier request for the same thing.

--
Our last-ditch plan is to change the forums into a podcast, then send
RSS feeds into the blogosphere so our users can further debate the
legality of mashups amongst this month's 20 'sexiest' gadgets.
        --Richard "Lowtax" Kyanka

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

signature.asc (196 bytes) Download Attachment