private static function detectStream($path)
    {
        $stream = 'file';

        if (false !== strpos($path, '://')) {
            $parts  = explode('://', $path);
            $stream = $parts[0];
        }

        return $stream;
    }