User Guide Cancel

GetTotalSpace

 

Description

Returns the total hard disk space or in-memory space available for an application.

Returns

Total space in bytes

Category

System functions

See also

getVFSMetadata

Syntax

getTotalSpace(path)

Parameters

Parameter

Description

path

Path to the

  • Hard disk drive, for example C: for Windows or / }}for UNIX. Note that for Windows, you have to explicitly use colon ({{:) and not just C. Only the space of the entire hard disk drive is returned. If you mention a directory in the path, for example, /opt/, it is ignored and only {{/ }}is considered.
  • For in-memory file system, the path is ram:.

Usage

Application memory is determined by the following settings for RAM:

  • In the ColdFusion Administrator, the value specified for Memory Limit per Application for In-Memory Virtual File System (Server Settings > Settings). The default value is 20 MB.
  • The value specified in the Application.cfc for this.inmemoryfilesystem.size

If you have set values in both the places, the lesser value is considered.

Even if the value specified in Application.cfc is lesser, ensure that Server Settings > Settings > Enable In-Memory File System is checked in the ColdFusion Administrator.

Example

See the example for GetFreeSpace.

 

Get help faster and easier

New user?