[futurebasic] Folder modification date

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2003 : Group Archive : Group : All Groups

From: michael evans <michael.evans@...>
Date: Mon, 17 Nov 2003 16:31:48 -0500
This is not working...

Anyone know how to get a folder's mod date...

Now, I'm trying to figure out how to obtain a folder's mod date.

This does not work:

'begin code------------------------
include "Tlbx Files.Incl"
include "Util_Files.incl"
include "Subs Quick Event Loop.Incl"

clear local
local fn getFolderModDate&(fldrPath$)
dim @ PBRec as CInfoPBRec
dim @ PBRecPtr as pointer
dim @ DrMdDat as long

PBRec.ioNamePtr& = @fldrPath$
PBRecPtr = @PBRec

long if fn PBGetCatInfoSync ( PBRecPtr) = _noErr
DrMdDat = PBRec.dirInfo.ioDrMdDat
DrMdDat = 0
end if
end fn = DrMdDat

dim as str255  fStr
dim as FSSpec  fs
dim err, acFldrPath$
dim fldrDte as long

fStr = Files$ (_FSSpecFolder, "Choose folder...", "", fs)

acFldrPath$ = acFldrPath$ + fs.name '+ ":"

fldrDte = fn getFolderModDate&(acFldrPath$)

print acFldrPath$
print fldrDte
'end code------------------------

I get error back:

Error: SubRecord 'dirInfo' is not part of the structure 'CINFOPBREC'
in file Temp Project at line 36 in GETFOLDERMODDATE&
€€DrMdDat = PBRec.dirInfo.ioDrMdDat


Michael Evans