ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
StreamedCopyTrait.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
League\Flysystem\Adapter\Polyfill
;
4
5
use
League\Flysystem\Config
;
6
7
trait
StreamedCopyTrait
8
{
17
public
function
copy(
$path
, $newpath)
18
{
19
$response
= $this->readStream(
$path
);
20
21
if
(
$response
===
false
|| ! is_resource(
$response
[
'stream'
])) {
22
return
false
;
23
}
24
25
$result
= $this->
writeStream
($newpath,
$response
[
'stream'
],
new
Config
());
26
27
if
(
$result
!==
false
&& is_resource(
$response
[
'stream'
])) {
28
fclose(
$response
[
'stream'
]);
29
}
30
31
return
$result
!==
false
;
32
}
33
34
// Required abstract method
35
40
abstract
public
function
readStream(
$path
);
41
48
abstract
public
function
writeStream
(
$path
, $resource,
Config
$config
);
49
}
$path
$path
Definition:
aliased.php:25
StreamedCopyTrait
League\Flysystem\Adapter\Polyfill\writeStream
writeStream($path, $resource, Config $config)
$config
$config
Definition:
bootstrap.php:15
$result
$result
Definition:
CleanUpTest.php:463
League\Flysystem\Adapter\Polyfill
Definition:
NotSupportingVisibilityTrait.php:3
League\Flysystem\Config
Definition:
Config.php:5
Config
php
$response
$response
Definition:
proxy_ylocal.php:39
libs
composer
vendor
league
flysystem
src
Adapter
Polyfill
StreamedCopyTrait.php
Generated on Thu Jan 16 2025 19:01:42 for ILIAS by
1.8.13 (using
Doxyfile
)