ListDirectory Method
Lists the current directory specified by RemotePath on the server.
Syntax
procedure 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* properties.
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