[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] (no subject)

From: Paolo Bonzini
Subject: Re: [Help-smalltalk] (no subject)
Date: Tue, 09 Jan 2007 08:52:19 +0100
User-agent: Thunderbird (Macintosh/20061207)

st> var2 filesMatching: 'test*' do: [:file | ( file name) display.
st>                                          ', ' display.
st>                                          file printNl ] !
/Users/johnp/projects/smalltalk/gnu/, a File
/Users/johnp/projects/smalltalk/gnu/testing, a Directory
/Users/johnp/projects/smalltalk/gnu/testing3, a Directory

This one does not descend into directories, and returns files or directories that match 'test*'.

and I get this from allFilesMatching:
var2 allFilesMatching: 'test*' do: [:file | (file name) display.
st>                                        ', ' display.
st>                                        file printNl] !
/Users/johnp/projects/smalltalk/gnu/, a File
/Users/johnp/projects/smalltalk/gnu/testing3/testing3-file, a File
/Users/johnp/projects/smalltalk/gnu/testing3/testing3-file-2, a File

This one descends into directories (not symlinks to directories) irrespective of whether they match 'test*', and returns file in those directories that match 'test*'.

If the method comment is not helpful, please propose an alternative wording.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]