foldersize(
PATH
)

The foldersize( function calculates the size of a folder (in bytes).


Parameters

This function has one parameter:

path – is a path to the folder, including the folder name (see Files and Folders for more information about file paths).


Description

This function returns the size of the specified folder. This example calculates the size of the Documents folder.

foldersize("~/Documents")

Note: This function can be slow if the folder contains a large number of files.

In addition to folders, this function can also determine the size of packages.

 foldersize("/Applications/PanoramaX.app")

The foldersize( function will also work on regular files, so you can use it as a replacement for the filesize( function if you wish.


See Also


History

VersionStatusNotes
10.2NewNew in this version.