org\bovigo\vfs\vfsStreamWrapper::splitPath PHP 메소드

splitPath() 보호된 메소드

splits path into its dirname and the basename
protected splitPath ( string $path ) : string[]
$path string
리턴 string[]
    protected function splitPath($path)
    {
        $lastSlashPos = strrpos($path, '/');
        if (false === $lastSlashPos) {
            return array('dirname' => '', 'basename' => $path);
        }
        return array('dirname' => substr($path, 0, $lastSlashPos), 'basename' => substr($path, $lastSlashPos + 1));
    }