Skip to content

Calculating storage space allocation

OpenCms is a multi-tenant content management system, often hosting several hundred websites in one installation. To provide an overview of the storage space allocation of individual tenants, a system for calculating folder sizes has been developed.
Date:
KW 41 / 2025

For each folder in the VFS, the size of all resources it contains is now stored internally and displayed in the info dialog. For performance reasons, the sizes are cached, which means they are only nearly up to date.

The Java API provides the utility function OpenCms.getFolderSizeTracker(online).getFolderReport(paths). By passing a list of VFS paths, selected folders can be queried, containing also the sizes excluding subpaths.