Next: , Previous: , Up: FilePath   [Index]


1.77.7 FilePath: enumerating

allFilesMatching: aPattern do: aBlock

Evaluate aBlock on the File objects that match aPattern (according to String>>#match:) in the directory named by the receiver. Recursively descend into directories.

directories

Answer an Array with Directory objects for the subdirectories of the directory represented by the receiver.

do: aBlock

Evaluate aBlock once for each file in the directory represented by the receiver, passing a FilePath object (or a subclass) to it. It depends on the subclass whether iteration will include the ’.’ and ’..’ directory entries.

entries

Answer an Array with File or Directory objects for the contents of the directory represented by the receiver.

entryNames

Answer an Array with the names of the files in the directory represented by the receiver.

files

Answer an Array with File objects for the contents of the directory represented by the receiver.

filesMatching: aPattern

Evaluate aBlock once for each file in the directory represented by the receiver, passing a File or Directory object to aBlock. Returns the *names* of the files for which aBlock returns true.

filesMatching: aPattern do: block

Evaluate block on the File objects that match aPattern (according to String>>#match:) in the directory named by the receiver.

namesDo: aBlock

Evaluate aBlock once for each file in the directory represented by the receiver, passing its name. It depends on the subclass whether iteration will include the ’.’ and ’..’ directory entries.

namesMatching: aPattern do: block

Evaluate block on the file names that match aPattern (according to String>>#match:) in the directory named by the receiver.

reject: aBlock

Evaluate aBlock once for each file in the directory represented by the receiver, passing a File or Directory object to aBlock. Returns the *names* of the files for which aBlock returns true.

select: aBlock

Evaluate aBlock once for each file in the directory represented by the receiver, passing a File or Directory object to aBlock. Returns the *names* of the files for which aBlock returns true.


Next: , Previous: , Up: FilePath   [Index]