Skip to content

Instantly share code, notes, and snippets.

@apipkin
Created February 25, 2010 16:15
Show Gist options
  • Save apipkin/314678 to your computer and use it in GitHub Desktop.
Save apipkin/314678 to your computer and use it in GitHub Desktop.
<?php
class dir
{
protected $d;
public $path;
public function __construct($path) {
$this->path = $path;
$this->d = opendir($path);
}
public function __destruct() {
closedir($this->d);
}
public function read() {
$this->path = readdir($d);
return $this->path;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment