EAGLE Help Light

fileglob()

Funkce
Perform a directory search.

Zápis
int fileglob(string &array[], string pattern);

Returns
The fileglob function returns the number of entries copied into array.

Description
fileglob performs a directory search using pattern.

pattern may contain '*' and '?' as wildcard characters. If pattern ends with a '/', the contents of the given directory will be returned.

Names in the resulting array that end with a '/' are directory names.

The array is sorted alphabetically, with the directories coming first.

The special entries '.' and '..' (for the current and parent directories) are never returned in the array.

If pattern doesn't match, or if you don't have permission to search the given directory, the resulting array will be empty.

Viz také dlgFileOpen(), dlgFileSave()

Note for Windows users

The directory delimiter in the array is always a forward slash. This makes sure User Language Programs will work platform independently. In the pattern the backslash ('\') is also treated as directory delimiter.

Sorting filenames under Windows is done case insensitively.

Příklad


string a[];
int n = fileglob(a, "*.brd");


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH