Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

Utilities.directoryList

Returns a vector of file names in a given directory that satisfy a specified filter pattern.

Syntax

Parameters

path
Path name of the directory to search.

filter
File filter, that typically includes wildcards. The two wildcards supported are:

recurse
A true value tells the method to look for matching files (based on the filter) in the subdirectories of the supplied path. A false value tells the method to restrict the search to the directory specify in path.

maxcount
Specifies the maximum number of files that will be returned in the vector. It is possible, though rare, to generate outofmemory exceptions by specifying a very large number.

Description

The directoryList method returns a vector of file names in a given directory that satisfy a specified filter pattern. Both the directory path and the filter are converted using osSafeSpec().

Returns

Returns the vector of file names in the path that match the filter.

Example

The following code finds all the Java source code files in directory /users/bob and all its subdirectories. Only the first 100 matching files will be returned:

See Also

osSafeSpec

 

  Home > Contents > Index >

FatWire JAVA Reference
Copyright 2005 by FatWire Software
All rights reserved.