NNETFILES() creation time of a file

NNETFILES() creation time of a file

Postby Otto » Fri Jun 15, 2018 3:37 pm

Hello,
I would need to get the creation time of a file.
It seems the is a function NNETFILES() in harbour.
Can someone help me please to get this information with xHarbour.
I can’t find this function in xHarbour.
Thank you in advance
Otto

NNETFILES() returns an array with subarrays (two-dimensional array). Each subarray contains information about each directory entry that is found. The structure of the subarrays are described in the following table.
Table 23.5: NNETFILES() Subarray Structure
Position Metasymbol CTNNET.CH Definition
1 cName NF_NAME Directory name
2 nSize NF_SIZE File size
3 cUpdDate NF_UPDDATE Date of last update
4 cUpdTime NF_UPDTIME Time of last update
5 dCrDate NF_CREADATE Creation date
6 nAttr NF_ATTR File attributes
7 nExtAttr NF_EXTATTR Extended file attributes
8 cOwner NF_OWNER Owner
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: NNETFILES() creation time of a file

Postby Enrico Maria Giordano » Fri Jun 15, 2018 5:42 pm

Try this:

Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL dCreated

    ? FILESTATS( "TEST.PRG", , , @dCreated ), dCreated

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: NNETFILES() creation time of a file

Postby Otto » Fri Jun 15, 2018 7:19 pm

Hello Enrico,
thank you for your help.
Something is not working as I aspect.
I am deleteing with Emagdbu.exe a record.
But FILESTATS() shows not the correct date of changing.
I use xHarbour.

"c:\xkm\T__058.dbf" dCreated = SToD("20180328") nCreateTime = 68501
"c:\xkm\T__058.dbf" dChangeDate = SToD("20180328") nChangeTime = 68501

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: NNETFILES() creation time of a file

Postby Enrico Maria Giordano » Fri Jun 15, 2018 8:44 pm

Can we see a little PRG sample showing the problem, please?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: NNETFILES() creation time of a file

Postby Enrico Maria Giordano » Sat Jun 16, 2018 10:06 am

This sample is working fine here:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL cDbf := "MYTEST.DBF"

    LOCAL dDMod, nTMod

    DBCREATE( cDbf, { { "TEST", "C", 10, 0 } } )

    FILESTATS( cDbf, , , , , @dDMod, @nTMod )

    ? DTOS( dDMod ), TIMEOFDAY( nTMod )

    USE ( cDbf )

    APPEND BLANK

    REPLACE FIELD -> test WITH "TEST"

    CLOSE

    FILESTATS( cDbf, , , , , @dDMod, @nTMod )

    ? DTOS( dDMod ), TIMEOFDAY( nTMod )

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests