Cloud Storage Integrator - Online Help
Cloud Storage Integrator
Questions / Feedback?

ListDirectory Method

Lists the current directory specified by RemotePath on the server.

Syntax

[VB.NET]
Public Sub ListDirectory()
[C#]
public void ListDirectory();

Remarks

This method is used to list the directory specified by RemotePath.

The directory entries are provided through the DirList event and also via the DirList property.


cloudstorage.RemoteFile = ""; //Clear filemask
cloudstorage.RemotePath = "MyFolder";
cloudstorage.ListDirectory();
for (int i = 0; i < cloudstorage.DirList.Count; i++)
{
  Console.WriteLine(cloudstorage.DirList[i].FileName);
  Console.WriteLine(cloudstorage.DirList[i].FileSize);
  Console.WriteLine(cloudstorage.DirList[i].FileTime);
  Console.WriteLine(cloudstorage.DirList[i].IsDir);
}

The RemoteFile property may also be used as a filemask when listing files. For instance:


component.RemoteFile = "*.txt"
component.ListDirectory()

Note: Since RemoteFile is used as a filemask be sure to clear or reset this value before calling ListDirectory

NOTE: This method has a corresponding asynchronous version (ListDirectoryAsync) for use in the Xamarin environment.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0