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_filegrab() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FILEGRAB()

 DESCRIPTION

 C_FILEGRAB() reads the specified number of bytes from the given
 file and returns a character string of the data read.  The file is
 automatically opened and closed by the function and the memory for
 the buffer is allocated.  The entire file is read, up to 64,000
 bytes, or optionally the number of bytes can be limited.

 SYNTAX

 C_FILEGRAB(filename [,bytes] [,network])

 PARAMETERS

 filename (C) is the name of the file to read.  The entire contents
 of filename will be read, up to 64,000 bytes, unless the bytes
 argument is specified.  The complete file name including drive and
 path can be specified.  If a drive and path are not given, the file
 is assumed to be in the current directory.

 bytes (N) is the number of bytes to read for the specified file
 from 1 to 64,000.  If bytes is not specified, the entire file will
 be read, up to 64,000 bytes.

 network (L) indicates whether or not the program is running on a
 network.  If the program is running on a network pass true (.T.) so
 the file can be opened with the proper share access, otherwise pass
 false (.F.).  If network is not specified, the default of false
 (.F.) is used.

 RETURNS

 C_FILEGRAB() returns a character string containing the information
 read from the file or null ("") if an error occurred or the file is
 empty.

 EXAMPLES

 xbuf = c_filegrab("TEST.TXT")       && grab text from file

 xwrap = .F.

 c_viewstr(10,10,20,69,xbuf,xwrap,3,"W/B",2)  && display on screen

 release xbuf


See Also: C_FILECOPY() C_FILEAPPEND() C_EXIST()

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