# SystemInfo

Import: `import com.install4j.api.SystemInfo;`

```java
public class SystemInfo
```

The class contains utility functions to get information about the current system
that is not available via the Java API.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getFreeDiskSpace(File)`](#getfreediskspace-file) | `long` | Retrieves the free disk space for the disk containing the given file on Windows, macOS and Linux. |
| [`getPhysicalMemory()`](#getphysicalmemory) | `long` | Retrieves the physical memory on Windows, macOS and Linux. |

### getFreeDiskSpace(File)

```java
public static long getFreeDiskSpace(File file)
```

Retrieves the free disk space for the disk containing the given file on Windows, macOS and Linux.


**Parameters:**

- `file` — the file or directory to check the disk space for

**Returns:** the free disk space in bytes. -1 if the information is not available.

### getPhysicalMemory()

```java
public static long getPhysicalMemory()
```

Retrieves the physical memory on Windows, macOS and Linux.


**Returns:** the physical memory in bytes. Zero if the information is not available.

## Constructors

| Signature | Description |
|---|---|
| [`SystemInfo()`](#systeminfo) |  |

### SystemInfo()

```java
public SystemInfo()
```

