Name Space Value

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Name Space Value

Postby Tranber44 on Thu Jan 28, 2016 11:12 am

Hello,

I wish to get back the date of creation and last access of a file. I use for it the DLL mscorlib:
⎕USING←',mscorlib.dll'
DCrea←System.IO.File.GetCreationTime(AdrFic)
DLastAcc←System.IO.File.GetLastAccessTime(AdrFic)
but DCrea and DLastAcc are Name Space from whom I do not know how to extract the value.

There is a solution?. Thank you.

Regards

Bertrand Delassus
Tranber44
 
Posts: 34
Joined: Mon Jan 11, 2010 4:46 pm

Re: Name Space Value

Postby PGilbert on Thu Jan 28, 2016 12:34 pm

Hello Bertrand, look at the namespace netDIO located at http://aplwiki.com/netDIO there is a method 'GetCreationTime' that should help you. After that you can do:

      DCrea.(Year Month Day Hour Minute Second Millisecond)


to get the equivalent ⎕TS
User avatar
PGilbert
 
Posts: 436
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: Name Space Value

Postby Tranber44 on Thu Jan 28, 2016 2:29 pm

Thank you for this answer which gives me complete satisfaction.

Regards

Bertrand Delassus
Tranber44
 
Posts: 34
Joined: Mon Jan 11, 2010 4:46 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest