Hardie82
Hardie82

Reputation: 880

How to get installtion size for script evaluation or custom components?

I need to check the disk space during a script/form component evaluation before I want to trigger an action. The standard installation directory dialog shows such an information but I do not find a possibility to get this information from the installer context at the script editor or custom component code. Is there a solution to get those information?

Thanks in advance.
Hardie

Upvotes: 1

Views: 54

Answers (2)

Ingo Kegel
Ingo Kegel

Reputation: 48015

It's currently not in the API, but you can call

com.install4j.runtime.installer.helper.content.ContentInstaller.getInstance().getMinSize()

to get the size in bytes.

Upvotes: 1

Serban Constantin
Serban Constantin

Reputation: 3576

I think you can use getTotalSize() for that.

Upvotes: 1

Related Questions