of_FileCopy


pfcapsrv.pbl   >   pfc_n_cst_filesrv   >   of_FileCopy   

Full name pfc_n_cst_filesrv.of_FileCopy
Access public
Extend of integer
Return value integer
Prototype public function integer of_FileCopy(string,string,boolean)

Name Datatype
No Data

Name Datatype
lblb_Data blob

public function integer of_FileCopy (string as_sourcefile, string as_targetfile, boolean ab_append);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_FileCopy
//	Arguments:		as_SourceFile			The name of the source file.
//						as_TargetFile			The name of the target file.
//						ab_Append				True - append to the target file if it exists,
//													False - overwrite the target file if it exists.
//	Returns:			Integer
//						1 if successful,
//						-1 if an error occurrs reading the source file,
//						-2 if an error occurrs writting to the target file.
//	Description:	Copy a file.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History:	Version
//						5.0   Initial version
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 Sybase, Inc. and its subsidiaries.  All rights reserved.  Any distribution of the 
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
blob		lblb_Data

// Read the source file into a blob
If of_FileRead(as_SourceFile, lblb_Data) < 0 Then Return -1

// Write to the target
If of_FileWrite(as_TargetFile, lblb_Data, ab_append) < 0 Then Return -2

Return 1
end function

     
Name Owner
pfc_n_cst_filesrv.of_FileCopy pfc_n_cst_filesrv

     
Name Owner
pfc_n_cst_filesrv.of_FileRead pfc_n_cst_filesrv
pfc_n_cst_filesrv.of_FileWrite pfc_n_cst_filesrv

     
Full name
No Data

     
Name Scope
No Data