Directory 類

(PHP 4, PHP 5, PHP 7, PHP 8)

簡介

Directory 實(shí)例是通過調(diào)用 dir() 函數(shù)創(chuàng)建的,而不是 new 操作符。

類摘要

class Directory {
/* 屬性 */
public string $path;
public resource $handle;
/* 方法 */
public close(resource $dir_handle = ?): void
public read(resource $dir_handle = ?): string
public rewind(resource $dir_handle = ?): void
}

屬性

path

被打開目錄的地址

handle

目錄句柄。可以被其他的目錄操作函數(shù)使用,例如 readdir(), rewinddir() and closedir()

目錄