xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

ScreenFile()

Writes the contents of the current screen to a file.

Syntax

ScreenFile( <cFileName>, ;
           [<lAppend>] , ;
           [<nOffSet>] , ;
           [<lTruncate>] ) --> nBytesWritten

Arguments

<cFileName>
This is a character string holding the name of the file to save a screen to. It must include path and file extension. If the path is omitted from <cFileName>, the file is searched in the current directory. If the file does not exist, it is created.
<lAppend>
If .T. (true) is passed, the current screen is appended to <cFileName>. The default value is .F. (false), i.e. the file <cFileName> is overwritten.
<nOffSet>
If <lAppend> is set to .T. (true), this numeric parameter defines the file offset, or starting posiion, where the current screen contents are stored. The default is the end-of-file.
<lTruncate>
When <lTruncate> is set to .T. (true) and the file pointer is not at the end-of-file after writing, the file size is reduced to the current file pointer position. The default value is .F. (false), which leaves the file size unchanged. The parameter is only required when multiple screens are stored in one file.

Return

The function writes the contents of the current screen to <cFileName> and returns the number of bytes written as a numeric value.

Info

See also:FileScreen(), SaveScreen(), RestScreen()
Category: CT:Video , Screen functions
Source:ct\strfile.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe