feature_readdir can be used to determine if the current platform supports the built-in procedure readdir.
if (supported(feature_closedir)) and
(supported(feature_readdir)) and
(supported(feature_opendir)) then
begin
//open directory, retrieve filenames, and then close directory
end
else
begin
//Opening, reading, and closing directories are not supported so do
// something else of abort.
end
Operating Systems: All
Standard Pascal: No