## CreateEntry(string, string) {#createentry_2}

Adds a file to the ISO image.

```csharp
public IsoEntry CreateEntry(string name, string filePath)
```

| Parameter | Type | Description |
| --- | --- | --- |
| name | String | Path of the file in the ISO. |
| filePath | String | Path of the file. |

### Return Value

The ISO entry composed.

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentNullException | The *filePath* is null. |
| ArgumentException | The *filePath* is empty, contains only white spaces, or contains invalid characters. |
| UnauthorizedAccessException | Access to file *filePath* is denied. |
| PathTooLongException | The specified *filePath* exceeds the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. |
| NotSupportedException | File at *filePath* contains a colon (:) in the middle of the string. |
| IOException | An I/O error occurred while opening the file. |
| ObjectDisposedException | Archive has been disposed and cannot be used. |
| DirectoryNotFoundException | The specified path is invalid, (for example, it is on an unmapped drive). |
| FileNotFoundException | The file specified in *filePath* was not found. |
| InvalidOperationException | The archive is not in editing mode. |

### See Also

* class [IsoEntry](../../isoentry/)
* class [IsoArchive](../)
* namespace [Aspose.Zip.Iso](../../isoarchive/)
* assembly [Aspose.Zip](../../../)

---

## CreateEntry(string, Stream) {#createentry_1}

Adds a file to the ISO image.

```csharp
public IsoEntry CreateEntry(string name, Stream source)
```

| Parameter | Type | Description |
| --- | --- | --- |
| name | String | Path of the file in the ISO. |
| source | Stream | Stream containing the file data. |

### Return Value

The ISO entry composed.

### Exceptions

| exception | condition |
| --- | --- |
| ObjectDisposedException | Archive has been disposed and cannot be used. |
| ArgumentNullException | Thrown when an *name* or *source* is null. |
| InvalidOperationException | The archive is not in editing mode. |

### See Also

* class [IsoEntry](../../isoentry/)
* class [IsoArchive](../)
* namespace [Aspose.Zip.Iso](../../isoarchive/)
* assembly [Aspose.Zip](../../../)

---

## CreateEntry(string) {#createentry}

Adds a file to the ISO image.

```csharp
public IsoEntry CreateEntry(string name)
```

| Parameter | Type | Description |
| --- | --- | --- |
| name | String | Path of the directory in the ISO. |

### Return Value

The ISO entry composed.

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentNullException | `name` is null or empty. |
| InvalidOperationException | The archive is opened for extraction. |
| ObjectDisposedException | Archive has been disposed and cannot be used. |

### See Also

* class [IsoEntry](../../isoentry/)
* class [IsoArchive](../)
* namespace [Aspose.Zip.Iso](../../isoarchive/)
* assembly [Aspose.Zip](../../../)


