Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_findfile() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FINDFILE()

 DESCRIPTION

 C_FINDFILE() locates files matching the given file specification
 and attributes and fills a series of specified arrays with
 information about the files.  The information includes the file's
 name, size, date, time, and attributes.

 NOTES

 C_FINDFILE() is similar to Clipper's ADIR() and DIRECTORY()
 functions except that the attribute specified with the function has
 more flexibility and control over the files retrieved.

 SYNTAX

 C_FINDFILE(filespec, attr [,f_name] [,f_size] [,f_date] [,f_time] [,f_attr])

 PARAMETERS

 filespec (C) is the file specification to be used to search for
 files.  The filespec argument can be any valid DOS file name and
 can include wild card characters (*, ?).  The complete file name
 including drive and path can be specified.  If a drive and path are
 not given, the search is made in the current directory.

 attr (C) is a character string containing the attributes that are
 acceptable for inclusion of the file(s) found in the search.  Only
 files found with matching attributes are included.  Any number of
 attributes can be specified in the string.  The following is a list
 of valid attributes:

 ATTRIBUTE   DESCRIPTION
 ---------   ------------
 N           Normal files (no R, H, S, or D with or without archive bit)
 R           Read-only files
 H           Hidden files
 S           System files
 D           Directories
 A           Archive attribute set

 f_name (A) is the Clipper array to be filled with file names found
 in the search.  The array must be declared to the correct length
 and passed without quotes.  Each array element will contain the
 file name as a character string.

 f_size (A) is the Clipper array to be filled with sizes of the
 files found in the search.  The array must be declared to the
 correct length and passed without quotes.  Each array element will
 contain the size of the file in bytes as a numeric.

 f_date (A) is the Clipper array to be filled with dates of the
 files found in the search.  The array must be declared to the
 correct length and passed without quotes.  Each array element will
 contain the date of the file as a date variable.

 f_time (A) is the Clipper array to be filled with times of the
 files found in the search.  The array must be declared to the
 correct length and passed without quotes.  Each array element will
 contain the time of the file as a character string.

 f_attr (A) is the Clipper array to be filled with attributes of the
 files found in the search.  The array must be declared to the
 correct length and passed without quotes.  Each array element will
 contain all of the attributes set for the file (R, H, S, D, or A)
 as a character string.

 RETURNS

 C_FINDFILE() returns the number of files found matching the given
 file specification and attributes.  If the array options are passed
 with the function, each array will be filled with the appropriate
 information.

 EXAMPLES

 && This example loads all of the arrays with info. about all
 && "normal" files found
 ct = c_findfile("*.*","N")

 private f_name[ct], f_size[ct], f_date[ct], f_time[ct], f_attr[ct]

 c_findfile("*.*","N",f_name,f_size,f_date,f_time,f_attr)


 && This example gets the names of all the directories in the root
 && dir. of C
 private f_name[c_findfile("C:\*.*","D")]

 c_findfile("C:\*.*","D",f_name)


See Also: C_FINDCNT() C_FINDFIRST() C_FINDNEXT() C_FFDATE() C_FFSIZE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson