xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

FileAppend()

Concatenates two files.

Syntax

FileAppend( <cSourceFile>, <cTargetFile> ) --> nBytesAdded

Arguments

<cSourceFile>
This is a character string containing the name of the file to append to the target file. It must be specified with a file extension. If <cSourceFile> contains no drive and/or directory information, the current directory is used. SET DEFAULT and SET PATH settings are ignored.
<cTargetFile>
This is a character string holding the name of the target file to append the contents of <cSourceFile> to. The file name may include drive and directory and must include an extension. The file is created if it does not exist. Otherwise, the function attempts to open the file for write access. When this fails, the source of error can be determined with FError().

Return

The function returns the number of bytes appended to <cTargetFile>. This is equivalent to the file size of <cSourceFile>. If the operation fails, the return value is zero.

Info

See also:CSetSafety(), FileCopy(), FileSeek()
Category: CT:DiskUtil , File functions , Low level file functions
Source:ct\fcopy.prg
LIB:xhb.lib
DLL:xhbdll.dll


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