Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea 3...
3
declare(strict_types=1);
3
declare(strict_types=1);
Línea -... Línea 4...
-
 
4
 
4
 
5
namespace OpenSpout\Reader\Wrapper;
5
namespace OpenSpout\Reader\Wrapper;
6
 
Línea 6... Línea 7...
6
 
7
use OpenSpout\Common\Exception\IOException;
7
use OpenSpout\Reader\Exception\XMLProcessingException;
8
use OpenSpout\Reader\Exception\XMLProcessingException;
Línea 50... Línea 51...
50
    public function getRealPathURIForFileInZip(string $zipFilePath, string $fileInsideZipPath): string
51
    public function getRealPathURIForFileInZip(string $zipFilePath, string $fileInsideZipPath): string
51
    {
52
    {
52
        // The file path should not start with a '/', otherwise it won't be found
53
        // The file path should not start with a '/', otherwise it won't be found
53
        $fileInsideZipPathWithoutLeadingSlash = ltrim($fileInsideZipPath, '/');
54
        $fileInsideZipPathWithoutLeadingSlash = ltrim($fileInsideZipPath, '/');
Línea -... Línea 55...
-
 
55
 
-
 
56
        $realpath = realpath($zipFilePath);
-
 
57
        if (false === $realpath) {
-
 
58
            throw new IOException("Could not open {$zipFilePath} for reading! File does not exist.");
-
 
59
        }
54
 
60
 
55
        return self::ZIP_WRAPPER.realpath($zipFilePath).'#'.$fileInsideZipPathWithoutLeadingSlash;
61
        return self::ZIP_WRAPPER.$realpath.'#'.$fileInsideZipPathWithoutLeadingSlash;
Línea 56... Línea 62...
56
    }
62
    }
57
 
63
 
58
    /**
64
    /**