Re: SFTP AttributesDataDelegate Not Executing (General questions)
Hi,
Here is simple example that will show you how to use GetAttributes Method inside wodSFTP.NET.
[code]WeOnlyDo.Client.SFTP sftp1;
private void Form1_Load(object sender, EventArgs e)
{
sftp1 = new WeOnlyDo.Client.SFTP();
sftp1.AttributesEvent += new WeOnlyDo.Client.SFTP.AttributesDelegate(sftp1_AttributesEvent);
sftp1.ConnectedEvent += new WeOnlyDo.Client.SFTP.ConnectedDelegate(sftp1_ConnectedEvent);
sftp1.Hostname = your_hostname ;
sftp1.Login = your_login ;
sftp1.Password = your_password ;
sftp1.Connect();
}
void sftp1_ConnectedEvent(object Sender, WeOnlyDo.Client.SFTP.ConnectedArgs Args)
{
if (Args.Error == null)
{
sftp1.GetAttributes( /home/somepath/somefile.rar );
}
else
Console.WriteLine( Error: + Args.Error.Message);
}
void sftp1_AttributesEvent(object Sender, WeOnlyDo.Client.SFTP.AttributesArgs Args)
{
Console.WriteLine(Args.ModificationTime.ToString());
}[/code]
Drazen
Complete thread:
- SFTP AttributesDataDelegate Not Executing - Harewood, 2012-12-26, 21:27
- Re: SFTP AttributesDataDelegate Not Executing - woddrazen, 2012-12-27, 10:48