file.size
| Syntax |
file.size (path)
|
| Params |
path is a legal path name to the file or folder whose size you wish to determine.
|
| Action |
Calculates the size of the file in bytes.
|
| Returns |
A number reflecting the size of the file in bytes.
|
| Examples |
file.size ("C:\\Program Files\\Frontier\\Frontier.root") » 3446224
string.megabyteString (file.size ("C:\\Program Files\\Frontier\\Frontier.root"))
file.size ("C:\\Program Files\\Frontier\\") This script returns 0 because this verb does not calculate folder sizes.
string.kBytes (file.size ("System:System Folder:System"))
file.size ("System:System Folder:") This script returns 0 because this verb does not calculate folder sizes.
This script returns 0 because this verb does not calculate volume sizes.
|
| Notes |
This is the size of both the data and resource forks. The size of a folder is 0 - use file.bytesInFolder to determine the size of a folder. The size of a disk volume is 0 - use file.bytesOnVolume for volumes.
|
| See Also |
file.bytesInFolder
|