list_directory Method
Lists the current directory specified by RemotePath on the server.
Syntax
def list_directory() -> None: ...
Remarks
This method is used to list the directory specified by remote_path.
The directory entries are provided through the on_dir_list 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 remote_file property may also be used as a filemask when listing files. For instance:
component.RemoteFile = "*.txt" component.ListDirectory()
Note: Since remote_file is used as a filemask be sure to clear or reset this value before calling list_directory