From a10feba63cac00c050120d1212bf72fff6609cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Mon, 13 May 2024 02:39:42 +0200 Subject: [PATCH] 2024-05-13 02:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * ChangeLog.txt * src/rtl/fscopy.c ! fixed typos, thanks to Grigory Filatov and Pete * include/harbour.hbx * src/harbour.def ! added hb_vfCopyFileEx() and hb_fileCopyEx() --- ChangeLog.txt | 13 +++++++++++-- include/harbour.hbx | 1 + src/harbour.def | 2 ++ src/rtl/fscopy.c | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 082e33cd5b..9b891b4592 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,15 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2024-05-13 02:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * ChangeLog.txt + * src/rtl/fscopy.c + ! fixed typos, thanks to Grigory Filatov and Pete + + * include/harbour.hbx + * src/harbour.def + ! added hb_vfCopyFileEx() and hb_fileCopyEx() + 2024-05-09 23:23 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * include/hbapifs.h * src/rtl/fscopy.c @@ -24,8 +33,8 @@ * src/rtl/vfile.c + added new PRG function: - hb_vfCopyFile( , , [=65536], ; - [=.t.], [] ) --> + hb_vfCopyFileEx( , , [=65536], ; + [=.t.], [] ) --> It's wrapper to hb_fileCopyEx() C function. For very big files setting to greater value, i.e. 16777216 may increase performance. diff --git a/include/harbour.hbx b/include/harbour.hbx index 30deabc19d..60af6bb701 100644 --- a/include/harbour.hbx +++ b/include/harbour.hbx @@ -945,6 +945,7 @@ DYNAMIC hb_vfClose DYNAMIC hb_vfCommit DYNAMIC hb_vfConfig DYNAMIC hb_vfCopyFile +DYNAMIC hb_vfCopyFileEx DYNAMIC hb_vfDirectory DYNAMIC hb_vfDirBuild DYNAMIC hb_vfDirExists diff --git a/src/harbour.def b/src/harbour.def index d24918225a..52e66cfb89 100644 --- a/src/harbour.def +++ b/src/harbour.def @@ -1138,6 +1138,7 @@ HB_FUN_HB_VFCLOSE HB_FUN_HB_VFCOMMIT HB_FUN_HB_VFCONFIG HB_FUN_HB_VFCOPYFILE +HB_FUN_HB_VFCOPYFILEEX HB_FUN_HB_VFDIRBUILD HB_FUN_HB_VFDIRECTORY HB_FUN_HB_VFDIREXISTS @@ -2469,6 +2470,7 @@ hb_fileClose hb_fileCommit hb_fileConfigure hb_fileCopy +hb_fileCopyEx hb_fileCreateTemp hb_fileCreateTempEx hb_fileDelete diff --git a/src/rtl/fscopy.c b/src/rtl/fscopy.c index 692018442a..95af64695a 100644 --- a/src/rtl/fscopy.c +++ b/src/rtl/fscopy.c @@ -185,7 +185,7 @@ HB_BOOL hb_fileCopyEx( const char * pszSource, const char * pszDest, HB_SIZE nBu long lJulian, lMillisec; if( hb_fileTimeGet( pszSource, &lJulian, &lMillisec ) ) - hb_fileTimeSet( hb_parcx( 1 ), lJulian, lMillisec ); + hb_fileTimeSet( pszDest, lJulian, lMillisec ); } } hb_fsSetError( errCode );