---
title: "IO.DirectoryIterator"
description: "IO directory iterator prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/io/io-directoryiterator"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/io/io-directoryiterator.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# IO.DirectoryIterator

## IO.DirectoryIterator

```
object @IO.DirectoryIterator(@Base) {
	construct(string $path) {}
	hasMore(): bool {}
	next(): object {}
	reset(): $this {}
}
```

**IO directory iterator prototype.**

### Prototype

**[Base](#)**

## Methods


### `$this.construct()`


```code
$this.construct(string $path): void
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| path | `string`  |  | "" |




### `$this.hasMore()`


```code
$this.hasMore(): bool
```

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `$this.next()`


```code
$this.next(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [path: filename] |
| `null` |  |




### `$this.reset()`


```code
$this.reset(): this
```

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |
