static function contents($directory) {
        if (!self::exists($directory)) return null;

        $dircontents = [];

        $contents = scandir($directory);

        foreach ($contents as $content) {
            if ($content != '.' && $content != '..') {
                array_push($dircontents, $content);
            }
        }

        return $dircontents;
    }
static function contents($directory) {
        if (!self::exists($directory)) return null;

        $dircontents = [];

        $contents = scandir($directory);

        foreach ($contents as $content) {
            if ($content != '.' && $content != '..') {
                array_push($dircontents, $content);
            }
        }

        return $dircontents;
    }
static function contents ( $ directory ) { if ( ! self :: exists ( $ directory ) ) return null ; $ dircontents = [ ] ; $ contents = scandir ( $ directory ) ; foreach ( $ contents as $ content ) { if ( $ content != '.' && $ content != '..' ) { array_push ( $ dircontents , $ content ) ; } } return $ dircontents ; }
Returns the contents of directory

@param   string  $directory  Path to directory

@return  array
Returns the contents of directory