<?
$dire = dir("1");
print "Pwd: ". realpath($dir->path) . "<brn>";
while (False !== ($entry = $dir->read())){
if (is_dir(realpath($dir->path).'/'.$entry)) {
echo "[".$entry."]" .(is_dir(realpath($dir->path).'/'.$entry)? '[w]' : '')."
n";
} else {
echo $entry.(is_dir(realpath($dir->path).'/'.$entry)? '[w]' : '')."
n";
}
}
$dir->close();
?>