Added a new function number_of_files()
Now using JDK 7