List Info

Thread: Directory enumeration




Directory enumeration
user name
2007-11-30 17:20:20
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
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Directory enumeration
country flaguser name
United States
2007-11-30 19:40:50
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
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )