Hi Hernan,

On Sat, Jun 17, 2017 at 11:59:59PM -0300, Hern??n Morales Durand wrote:
> I would like to find files in Pharo like the UNIX find command:
> 
> find . -iname "*.txt" -type f -print
> 
> find . \( -iname "*.txt" -o -iname "*.csv" \) -print
> 
> find . -maxdepth 2 -name "example*"  -type f -print
> 
> find . -type f -atime -7 -size +2M -perm 644 -print
> 
> Do we have some package on top of FileSystem to make complex find searches?

You might also like to look at the FileSystemVisitor class and subclasses.

Currently you can't strictly do a "-type f" test.  The closest at the
moment is "isDirectory" and "isDirectory not" (which is what #isFile is
defined as).

I've got some patches lined up which will allow you to test things like
#isRegular (which matches "-type f"), #isSymlink, etc.  But it will be
a while before they become available as it involves a new VM plugin.

Cheers,
Alistair


Reply via email to