SilverScreen Solid Modeler

find_first

find_first

Previous topic Next topic  

find_first

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int find_first ( char *path, char *buf )

 

char *path;      // file specification pattern

char *buf;       // character buffer to receive filename

 

 




Synopsis

#include "silver.h"

 

The find_first function searches the disk for a file matching the file pattern path (which is potentially wildcarded with * or ? characters), and copies the first such filename into buf . Further matches may be retrieved by using find_next .

 

 

Parameters

path is a null-terminated string, containing the file pattern. buf is the address of a character buffer, sufficiently large enough to hold a filename.

 

 

Return Value

find_first returns 0 if no matching file was found; otherwise, the following values are returned:
 

Name

Value

Meaning

FILE_NORMAL

1

the filename refers to a normal file

FILE_SUBDIR

2

the filename refers to a subdirectory

 

Further, these return values may have the following values or'ed in:
 

Name

Value

Meaning

FILE_HIDDEN

0x10

the file is hidden

FILE_RDONLY

0x20

the file is read-only

FILE_SYSTEM

0x40

the file is marked as a system file

FILE_VOLID

0x80

the file vepresents a volume ID

FILE_ARCHIVE

0x100

the file is marked as archived

 

 

See Also

find_next