The DirectoryIterator class

From Get docs

The DirectoryIterator class


(PHP 5, PHP 7, PHP 8)

The DirectoryIterator class provides a simple interface for viewing the contents of filesystem directories.

Class synopsis

class DirectoryIterator extends SplFileInfo implements SeekableIterator {

/* Methods */

public __construct(string $directory)

public current(): DirectoryIterator
public getATime(): int
public getBasename(string $suffix = ""): string
public getCTime(): int
public getExtension(): string
public getFilename(): string
public getGroup(): int
public getInode(): int
public getMTime(): int
public getOwner(): int
public getPath(): string
public getPathname(): string
public getPerms(): int
public getSize(): int
public getType(): string
public isDir(): bool
public isDot(): bool
public isExecutable(): bool
public isFile(): bool
public isLink(): bool
public isReadable(): bool
public isWritable(): bool
public key(): int|false
public next(): void
public rewind(): void
public seek(int $offset): void
public __toString(): string
public valid(): bool


Table of Contents

© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.