login about faq

There appears to be a behavior change in SFTP directory/file handling between DLL versions and as observed in your example program:

Chilkat.SFtpDir dirListing = null;
dirListing = sftp.ReadDir(handle);

int i;
int n = dirListing.NumFilesAndDirs;

for (i = 0; i <= n - 1; i++)
   Chilkat.SFtpFile fileObj = null;
   fileObj = dirListing.GetFileObject(i);

   Console.WriteLine("Size in bytes: " + fileObj.Size32);

The "." and ".." directories are included in the v9.1.2 output, but not in the version output.

asked Jun 13 '12 at 19:29

chilkat's gravatar image

chilkat ♦♦

Yes, omitting the "." and ".." was an intentional change because developers did not want them included.

Here's a new build that includes a new SFTP property named IncludeDotDirs. The default value is false. If set to true, then the "." and ".." directories will be included in the results.


This new property will become available in the next official release.


answered Jun 13 '12 at 19:31

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 13 '12 at 19:29

Seen: 1,453 times

Last updated: Jun 13 '12 at 19:31

powered by OSQA