file.foldersOnVolume

Syntax file.foldersOnVolume (path)

Params path is the name of the volume on which you wish to determine the number of folders.

Action Determines the number of folders on a volume.

Returns The number of folders on the indicated volume.

Examples file.foldersOnVolume ("C:")

   » 0

file.foldersOnVolume ("System:")

   » 190

file.foldersOnVolume ("Untitled:")

   » 1

file.foldersOnVolume ("No such volume:")
This situation produces a run-time error.

Errors Attempting to find out how many folders exist on a non-existent volume results in an error message.

Notes The File system maintains this number, so this verb requires no traversal of the directory. It is therefore fast.

The count includes invisible folders.

If path is an AppleShare volume, this verb returns 0.

See Also file.filesOnVolume

file.foldersInFolder

Discuss