GetAttributes Method and Attributes event - WeOnlyDo Discussion board

GetAttributes Method and Attributes event (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Gina, Thursday, April 06, 2006, 17:20 (6620 days ago)

I'm trying to use GetAttributes Method to fire off the Attributes event to show the the access time of a specific file in VB.NET.

How does the Attributes event display the access time from the GetAttributes Method? Any sample code would help!

Thanks

Re: GetAttributes Method and Attributes event

by wodAlan, Thursday, April 06, 2006, 20:58 (6620 days ago) @ Gina

Hi Gina,
Just call GetAttributes Method, something like this:
Sftp1.GetAttributes( / )
You can call GetAttributes from Connected Event or from something what satisfy your needs.
And from Atrributes Event you call something like this:
MsgBox(Args.AccessTime)
This will drop message box with access time of courent folder.
So, my code goes something like this:
[code]
Private Sub Sftp1_ConnectedEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SFTP.ConnectedArgs) Handles Sftp1.ConnectedEvent
Sftp1.GetAttributes( / )
End Sub

Private Sub Sftp1_AttributesEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SFTP.AttributesArgs) Handles Sftp1.AttributesEvent
MsgBox(Args.AccessTime)
End Sub
[/code]

Hope I helped.

Regards,
Alan