Page 1 of 1

CountDirectoryEntries

Posted: Tue Nov 24, 2020 5:36 pm
by Juan Carlos
I have problem with this instruction, I don't understand how give the result of numeber of directories from one folder, it the instruction is:
n = CountDirectoryEntries(id[, what])

Where the id is the number of file and for default it got the number of files #COUNTFILES, how I do
to get the folders using the #COUNTDIRECTORES paramater if I did this:

OpenDirectory(1, "Cache/___IndexedDB/v1/")
numcarpetas=CountDirectoryEntries(1, #COUNTDIRECTORES)
CloseDirectory(1)

But with this I got this message: Constant not found!
I try to put the #COUNTDIRECTORES these ways:
CountDirectoryEntries(1, {#COUNTDIRECTORES})
CountDirectoryEntries(1, {what=#COUNTDIRECTORES})
CountDirectoryEntries(1, "#COUNTDIRECTORES")
neither by bored the instruction has worked, where is my fault?

Re: CountDirectoryEntries

Posted: Tue Nov 24, 2020 5:56 pm
by jPV
It's an error in the documentation. Add an I letter there:
numcarpetas=CountDirectoryEntries(1, #COUNTDIRECTORIES)

Re: CountDirectoryEntries

Posted: Wed Nov 25, 2020 11:29 am
by Juan Carlos
Thank you, for your help, yes, the problem was the lack of I letter, curiosly the guide in english also has this problem.