lib/VirtFs.php
public function getDirectoryListing($path='/')
    {
        // 1. find out what is mounted on this path
        $listing = array();
        foreach($this->nodes as $node) {
            $mp = $node->getMountPoint();
            if ((dirname($mp) == $path) && ($path != '/')) {
                $listing[] = basename($mp)."/";
            }
            if (strncmp($path, $mp, strlen($mp)) === 0) {
                $listing = array_merge($listing, $node->getDirectoryListing($path));
            }
        }
        
        return $listing;
    }
public function getDirectoryListing($path='/')
    {
        // 1. find out what is mounted on this path
        $listing = array();
        foreach($this->nodes as $node) {
            $mp = $node->getMountPoint();
            if ((dirname($mp) == $path) && ($path != '/')) {
                $listing[] = basename($mp)."/";
            }
            if (strncmp($path, $mp, strlen($mp)) === 0) {
                $listing = array_merge($listing, $node->getDirectoryListing($path));
            }
        }
        
        return $listing;
    }
public function getDirectoryListing ( $ path = '/' ) { // 1. find out what is mounted on this path $ listing = array ( ) ; foreach ( $ this -> nodes as $ node ) { $ mp = $ node -> getMountPoint ( ) ; if ( ( dirname ( $ mp ) == $ path ) && ( $ path != '/' ) ) { $ listing [ ] = basename ( $ mp ) . "/" ; } if ( strncmp ( $ path , $ mp , strlen ( $ mp ) ) === 0 ) { $ listing = array_merge ( $ listing , $ node -> getDirectoryListing ( $ path ) ) ; } } return $ listing ; }
Get a directory listing from the virtual filesystem.

@param string The path to get the listing of
@return type
Get a directory listing from the virtual filesystem .