## getMatchingFiles

### Syntax:

    getMatchingFiles (extension);

### Purpose:

Finds all files in the current directory which end in the given extension.

This function supports filename bodging - for details see the bodgeFilenames command.

### Return value:

The function returns a stack containing an element for every file which was found. Each element is the name of a one of the files without the extension. The values in this stack can then be displayed on the screen for a user to choose which saved game to load or overwrite, although programming such an interface is left to the developer.

### See also:

The Multi-Purpose Stack / Array / Queue Type

fileExists

deleteFile

loadGame

saveGame

renameFile

SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012