feature_opendir can be used to determine if the current platform supports the built-in procedure opendir.
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 is not supported so do
// something else of abort.
end
Operating Systems: All
Standard Pascal: No