If those ".mp4" files are inside sketch's "/data/" subfolder, and you're only interested about how many there are, the code below goes direct to the point: ;)
P.S.: If you're sure all ".mp4" extensions are 100% in toLowerCase() already, that is there's no ".MP4", you can safely remove it and gain some minuscule speed: return name.endsWith(".mp4");
Answers
http://forum.processing.org/two/discussions/tagged/filenamefilter
Thanks, @GoToLoop! One little thing:
As for http://forum.processing.org/two/discussion/8233/counting-the-files-in-a-folder#latest
And if the number of mp4 files before each execution of the program is static, I could use the sample:
And after get names.length to be aware of the number? The folder name shoud be "data"? And what would be an example of FILTER?
If those ".mp4" files are inside sketch's "/data/" subfolder, and you're only interested about how many there are, the code below goes direct to the point: ;)
P.S.: If you're sure all ".mp4" extensions are 100% in toLowerCase() already, that is there's no ".MP4", you can safely remove it and gain some minuscule speed:
return name.endsWith(".mp4");
Thank you, @GoToLoop! Got it all.