ClassesClasses | | Operators

copy_filecopy_fileCopyFileCopyFile (Operator)

Name

copy_filecopy_fileCopyFileCopyFile — Copy a file to a new location.

Signature

copy_file( : : SourceFile, DestinationFile : )

Herror copy_file(const char* SourceFile, const char* DestinationFile)

Herror T_copy_file(const Htuple SourceFile, const Htuple DestinationFile)

void CopyFile(const HTuple& SourceFile, const HTuple& DestinationFile)

static void HMisc::CopyFile(const HString& SourceFile, const HString& DestinationFile)

static void HMisc::CopyFile(const char* SourceFile, const char* DestinationFile)

static void HOperatorSet.CopyFile(HTuple sourceFile, HTuple destinationFile)

static void HMisc.CopyFile(string sourceFile, string destinationFile)

Description

copy_filecopy_fileCopyFileCopyFileCopyFile copies SourceFileSourceFileSourceFileSourceFilesourceFile to DestinationFileDestinationFileDestinationFileDestinationFiledestinationFile. Existing files are silently overwritten. The file attributes of SourceFileSourceFileSourceFileSourceFilesourceFile are kept.

Execution Information

Parameters

SourceFileSourceFileSourceFileSourceFilesourceFile (input_control)  filename.read HTupleHTupleHtuple (string) (string) (HString) (char*)

File to be copied.

DestinationFileDestinationFileDestinationFileDestinationFiledestinationFile (input_control)  filename.write HTupleHTupleHtuple (string) (string) (HString) (char*)

Target location.

Result

copy_filecopy_fileCopyFileCopyFileCopyFile returns the value 2 (H_MSG_TRUE) if the file could be copied. Otherwise, an exception is raised.

Module

Foundation


ClassesClasses | | Operators