xHarbour Reference Documentation > Function Reference |
Seeks files specified by a file mask and file attributes.
FileSeek( [<cFileMask>] , ; [<nAttributes>] ) --> cFileName
Values for file attributes
Value | Attribute |
---|---|
0 | Normal |
1 | Read only |
2 | Hidden |
4 | System |
8 | Volume |
16 | Directory |
32 | Archived |
Returns a filename matching the specified parameters or a null string ("") if no further file is found.
The parameters for FileSeek() must be specified for an initial call of the function. Subsequent calls can be performed without parameters. FileSeek() returns the next file matching the initial parameters until no further file is found.
See also: | FileAttr(), FileDate(), FileSize(), FileTime() |
Category: | CT:DiskUtil , File functions , Low level file functions |
Source: | ct\files.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays all PRG files in the current directory PROCEDURE Main LOCAL cFileName ? cFileName := FileSeek( "*.prg" ) DO WHILE .NOT. Empty( cFileName ) ? cFileName := FileSeek() ENDDO RETURN
http://www.xHarbour.com