Getting file date? File System Connector, lastModified property
(too old to reply)
2017-07-27 18:14:23 UTC
I'm working on a project, we're processing an inbound feed from a vendor daily. Since the data coming is still fairly volatile, I keep up with some statistics and notes which I email to myself at the conclusion of the AL.

I'm using the standard File System Connector and CSV Parser to read the feed file.

In the connector's Prolog -> After Initialize hook, how would I get the last modified time stamp?

The conn object is not in scope at this point. I didn't find a clear pointer on the tdi-users org site. The date is relevant to me to ensure we did in fact get a new file from the vendor overnight.

2017-07-28 13:05:13 UTC
For those that cross this bridge in the future, our answer was:

var f = new java.io.File([""], thisConnector.getConnectorParam("filePath"));
var notice = "File Modified: " + new Date(f.lastModified()).toLocaleString();
mailText += "\n" + notice;