bug #18271 [FileSystem] Google app engine filesystem (swordbeta)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #18271).
Discussion
----------
[FileSystem] Google app engine filesystem
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/17922
| License | MIT
| Doc PR | -
Commits
-------
06d8697
[FileSystem] Add support for Google App Engine.
This commit is contained in:
commit
7dafdda580
@ -486,13 +486,13 @@ class Filesystem
|
|||||||
{
|
{
|
||||||
list($scheme, $hierarchy) = $this->getSchemeAndHierarchy($dir);
|
list($scheme, $hierarchy) = $this->getSchemeAndHierarchy($dir);
|
||||||
|
|
||||||
// If no scheme or scheme is "file" create temp file in local filesystem
|
// If no scheme or scheme is "file" or "gs" create temp file in local filesystem
|
||||||
if (null === $scheme || 'file' === $scheme) {
|
if (null === $scheme || 'file' === $scheme || 'gs' === $scheme) {
|
||||||
$tmpFile = tempnam($hierarchy, $prefix);
|
$tmpFile = tempnam($hierarchy, $prefix);
|
||||||
|
|
||||||
// If tempnam failed or no scheme return the filename otherwise prepend the scheme
|
// If tempnam failed or no scheme return the filename otherwise prepend the scheme
|
||||||
if (false !== $tmpFile) {
|
if (false !== $tmpFile) {
|
||||||
if (null !== $scheme) {
|
if (null !== $scheme && 'gs' !== $scheme) {
|
||||||
return $scheme.'://'.$tmpFile;
|
return $scheme.'://'.$tmpFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user