file.volumeSize
| Syntax |
file.volumeSize (path)
|
| Params |
path is the name of the volume whose total capacity you wish to determine.
|
| Action |
Determines the total capacity of the designated volume.
|
| Returns |
The total capacity of the volume in bytes.
|
| Examples |
file.volumeSize ("C:\\") 2146467840
file.volumeSize ("System:") // an 80 megabyte hard disk
file.volumeSize ("Dialog:") /1024 // an 800K floppy
This script displays the percentage of a volume that is available for storage: capacity = single (file.volumeSize (f)); freespace = single (file.freeSpaceOnVolume (f)); pctFree = ( (freespace / capacity) * 100); return (pctFree + "%") 34.9773%
|
| Errors |
Attempting to find out the total capacity of a non-existent volume results in an error message.
|
| Notes |
The File System maintains this number, so no traversal of the directory is necessary. Therefore, this verb is fast. This verb will not return the correct result if the size of the volume is larger than 2 Gigabytes. If you are running Frontier 6.1 or later, you should use file.volumeSizeDouble instead which will work with volume sizes of up to 4 Terabytes.
|
| See Also |
file.volumeSizeDouble
|