dio_write
Installing/Configuring
File System Related Extensions
PHP Manual

# Directories

Table of Contents

- Installing/Configuring
  - Requirements
  - Installation
  - Runtime Configuration
  - Resource Types
- Predefined Constants
- Directory — The Directory class
  - Directory::close — Close directory handle
  - Directory::read — Read entry from directory handle
  - Directory::rewind — Rewind directory handle
- Directory Functions
  - chdir — Change directory
  - chroot — Change the root directory
  - closedir — Close directory handle
  - dir — Return an instance of the Directory class
  - getcwd — Gets the current working directory
  - opendir — Open directory handle
  - readdir — Read entry from directory handle
  - rewinddir — Rewind directory handle
  - scandir — List files and directories inside the specified path

# The Directory class

## Introduction

Instances of Directory are created by calling the dir function, not by the new operator.

## Class synopsis

Directory
class Directory {
/* Properties */
public string $path ;
public resource $handle ;
/* Methods */
public void close ([ resource `$dir_handle` ] )
public string read ([ resource `$dir_handle` ] )
public void rewind ([ resource `$dir_handle` ] )
}

## Properties

path

  The directory that was opened.

handle

  Can be used with other directory functions such as readdir, rewinddir and closedir.