library/Storage/Adapter/FileSystem/FileSystemAbstractServiceFactory.php
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        $config = $this->getConfig($serviceLocator)[$requestedName];

        $storage = new FileSystemAdapter();
        $storage->setPath(realpath($config['path']));
        $storage->setResolver($serviceLocator->get($config['resolver']));
        return $storage;
    }
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        $config = $this->getConfig($serviceLocator)[$requestedName];

        $storage = new FileSystemAdapter();
        $storage->setPath(realpath($config['path']));
        $storage->setResolver($serviceLocator->get($config['resolver']));
        return $storage;
    }
Create service with name

@param ServiceLocatorInterface $serviceLocator
@param $name
@param $requestedName
@return mixed