fcount, dcount = ReadDirectory(dir$, files$, dirs$[, sort])
dir$
and puts all
filenames found in the directory tree to the string array specified in
files$
and all directory names to the string array specified in dirs$
.
After the last item, this function will insert an empty string into the
array, so you know how many files/directories were found.
By default, all file and directory entries will be automatically sorted
by this function. If you do not want this behaviour, you can set the
optional argument sort
to False
.
Starting with Hollywood 2.0 this function returns two values: The first return value indicates how many files were in the directory and the second one indicates how many subdirectories were in the directory.
dir$
(V2.0)dir$
(V2.0)f$ = {} d$ = {} ReadDirectory("Data", f$, d$)The above code reads the contents of the "Data" directory into the string arrays
f$
and d$
.