Post by Jim Nagel
There must be a simple way to test whether a directory is empty,
please? But I am an ignoramus. Thanks.
Use the X prefix to avoid error reporting:
So X Filer_OpenDir will open a directory if it exists, but will do nothing
if it doesn't.
It'll still open it if it exists but is empty!
If that's no good, try this from BASIC:
SYS"OS_File",23,fullpath$ TO present%,,,,,,objftype%
REM case present% of 0=absent 1=file 2=directory 3=image file
Check for the presence of the directory object, and then for anything
John Williams, now back in the UK - no attachments to these addresses!
Non-RISC OS posters change user to johnrwilliams or put 'risc' in subject!
Who is John Williams? http://petit.four.free.fr/picindex/author/