protected function listItem($type, $dir = '/.', $recursive = false, $ignore = array())
    {
        if ($type == 'dir') {
            $bool = true;
        } elseif ($type == 'file') {
            $bool = false;
        } else {
            throw new \InvalidArgumentException('$type must "file" or "dir"');
        }
        
        $parseDir = $this->parseLastDirectory($dir);
        $sDir = $this->getWrapper($parseDir);
        $fileList = array_diff(scandir($sDir), array('..', '.'));
        
        $fileInfo = array();
        foreach ($fileList as $file) {
            if ($this->ignoreItem($type, $file, $ignore) !== true && is_dir("$sDir/$file") === $bool) {
                $fileInfo[] = $file;
            }
            if ($recursive === true && is_dir("$sDir/$file") === true) {
                $fileInfo = array_merge($fileInfo, $this->listItem($type, "$dir/$file", $recursive, $ignore));
            }
        }
        
        return $fileInfo;
    }