company logo

FileHandle :: Copy - Copy

The function copies files from a source to a destination. The source file has to exist and the target must not exist. Otherwise, copy will fail. The function operates with the file name passed in cpath and target regardless whether the file is currently open in the FileHandle or not.

FileHandle DocFile;

DocFile.Copy("/tmp/file1","/tmp/file2");

Return value:  Return value ( logical  )

The function returns YES when the question was answered positively. Otherwise it returns NO.

Implementation details

logical FileHandle  :: Copy ( NPath &cpath, NPath &target )
  • cpath - Complete file or directory path
  • target - Complete path to target