Contents

Roo

File.count

If this File object is a directory then returns the number of top-level files and folder within it. Returns 0 if this is a single file.

var f = File("/Users/garry/Desktop")
f.count # => 5;