# InstallerDirectoryEvent

Import: `import com.install4j.api.events.InstallerDirectoryEvent;`

```java
public class InstallerDirectoryEvent extends InstallerEvent
```

The event object that is passed to installer event listeners for the directory creation event.
Event listeners are registered in the [`InstallerContext`](../context/InstallerContext.md).

This event object contains additional information about the installed file.
The event type [`EventType.DIRECTORY_CREATED`](EventType.md#directory-created)
produces this event object when fired.


**See also:**

- [InstallerEventListener](InstallerEventListener.md)
- [InstallerContext.addInstallerEventListener](../context/InstallerContext.md#addinstallereventlistener-installereventlistener)

## Inherited from

- [InstallerEvent](InstallerEvent.md) — 6 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getDirectory()`](#getdirectory) | `File` | Get the created directory associated with this event. |
| [`toString()`](#tostring) | `String` |  |
| [`getVerbose()`](#getverbose) | `String` |  |

### getDirectory()

```java
public File getDirectory()
```

Get the created directory associated with this event.


**Returns:** the file

### toString()

```java
public String toString()
```

### getVerbose()

```java
public String getVerbose()
```

## Constructors

| Signature | Description |
|---|---|
| [`InstallerDirectoryEvent(Object, Context, EventType, boolean, File)`](#installerdirectoryevent-object-context-eventtype-boolean-file) | The constructor is called by the framework. |

### InstallerDirectoryEvent(Object, Context, EventType, boolean, File)

```java
public InstallerDirectoryEvent(Object source, Context context, EventType type, boolean success, File directory)
```

The constructor is called by the framework.


**Parameters:**

- `source` — the event source
- `context` — the context
- `type` — the event type.
- `success` — whether the operation associated with the event was successful
- `directory` — the installed file

