The listing file/folder activity list all the files or folder in a directory
uses System.IOUtils.TDirectory.GetDirectories
uses System.IOUtils.TDirectory.GetFiles
Activity properties
begin var FileList: ICodolexList<string>; FileList := TCodolexCollections.CreateList<string>; FileList.AddRange(TDirectory.GetFiles('C:\...\Codolex\Documentation')); end; |
Resulting code
When the option 'Folder' is selected, only folders will be listed.
When the option 'File is selected, only files will be listed.
When a non-valid path is provided, a EDirectoryNotFoundException is thrown