Return true if path is dir and has at least one childs directory

@param  string  $path  dir path
@return bool
@author Dmitry (dio) Levashov
425906
protected function _subdirs($path) {
		
		foreach (ftp_rawlist($this->connect, $path) as $str) {
			if (($stat = $this->parseRaw($str)) && $stat['mime'] == 'directory') {
				return true;
			}
		}
		return false;
	}
1154006
public function exists($path)
    {
        if ('.' === $path || empty($path)) {
            $path = $this->localPath;
        } else {
            $path = "{$this->localPath}/{$path}";
        }

        return $this->filesystem->has($path);
    }
646632
public static function isFile($path)
    {
        if (is_file($path)) {
            if (strstr(PHP_OS, 'WIN')) {
                if (basename(realpath($path)) != basename($path)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
1275619
private function createPathIfNeeded(string $path) : bool
    {
        if (! is_dir($path)) {
            if (@mkdir($path, 0777 & (~$this->umask), true) === false && ! is_dir($path)) {
                return false;
            }
        }

        return true;
    }
445678
protected function pathIsDirectory($path)
    {
        $exp = explode(DIRECTORY_SEPARATOR, $path);
        $name = end($exp);
        $exp = explode(".", $name);

        return !(count($exp) >= 2);
    }
369184
protected function checkPath($path)
    {
        foreach ($this->chroots as $chroot) {
            if (StringHelper::contains($path, $chroot)) {
                return true;
            }
        }
        return false;
    }
627818
public function has($path)
    {
        $file_stat = $this->getMetadata($path);
        return !empty($file_stat) ? true : false;
    }
168614
public static function isDirectory(string $path) : bool
    {
        try {
            return ErrorCatcher::run(static function() use ($path) {
                return is_dir($path);
            });
        } catch (\ErrorException $e) {
            throw new IoException('Error checking if ' . $path . ' is a directory', 0, $e);
        }
    }
89666
public function has($path)
    {
        $location = $this->applyPathPrefix($path);

        if ($this->s3Client->doesObjectExist($this->bucket, $location, $this->options)) {
            return true;
        }

        return $this->doesDirectoryExist($location);
    }
1253453
protected function isWithinFilesystem($path)
    {
        $pathUrl = new Url($path);
        $fsUrl = $this->filesystem->url();

        if (!$pathUrl->scheme) {
            $pathUrl = $pathUrl->scheme('file');
        }

        if (!$fsUrl->scheme) {
            $fsUrl = $fsUrl->scheme('file');
        }

        if ($pathUrl->scheme != $fsUrl->scheme) {
            return false;
        }

        if (Helper::startsWith("$pathUrl->path", "$fsUrl->path")) {
            return true;
        }

        return $this->filesystem->exists($path);
    }
682688
protected function _subdirs($path) {

		if (($dir = dir($path))) {
			$dir = dir($path);
			while (($entry = $dir->read()) !== false) {
				$p = $dir->path.DIRECTORY_SEPARATOR.$entry;
				if ($entry != '.' && $entry != '..' && is_dir($p) && !$this->attr($p, 'hidden')) {
					$dir->close();
					return true;
				}
			}
			$dir->close();
		}
		return false;
	}
232015
public static function delete($path)
    {
        if (is_dir($path)) {
            Folder::delete($path);
        } elseif (is_file($path)) {
            File::delete($path);
        }

        return true;
    }
1341672
private static function dirReady($path) {
    if (!file_exists($path)) {
      $parent = preg_replace("/\/[^\/]+\/?$/", '', $path);
      if (!self::dirReady($parent)) {
        return FALSE;
      }

      mkdir($path, 0777, true);
    }

    if (!is_dir($path)) {
      trigger_error('Path is not a directory ' . $path, E_USER_WARNING);
      return FALSE;
    }

    if (!is_writable($path)) {
      trigger_error('Unable to write to ' . $path . ' – check directory permissions –', E_USER_WARNING);
      return FALSE;
    }

    return TRUE;
  }
319279
protected function isDirectory($path)
    {
        $location = $this->applyPathPrefix($path);

        if (empty($location)) {
            return true;
        }

        try {
            $file = $this->share->stat($location);
        } catch (NotFoundException $e) {
            return false;
        }

        return $file->isDirectory();
    }
317728
private function checkPath($path)
    {
        return file_exists($path) && is_readable($path) && ($resources = scandir($path)) && (count($resources) > 2);
    }
398094
public function isAbsolutePath($path)
    {
        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            if (preg_match('/^[A-Z]:\\\\/', $path)) {
                return true;
            }
        } else {
            if (substr($path, 0, 1) == DIRECTORY_SEPARATOR) {
                return true;
            }
        }

        return false;
    }
327152
private static function checkSavePath($path) {
            if (is_string($path)) {
                $dir = dirname($path);

                return file_exists($dir) && is_writeable($dir);
            } elseif (is_resource($path)) {
                return true;
            }

            return false;
        }