ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
$
c
d
e
f
g
h
i
j
l
m
n
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
§
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
§
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Modules
Pages
ForcedCopy.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
League\Flysystem\Plugin
;
4
5
use
League\Flysystem\FileNotFoundException
;
6
7
class
ForcedCopy
extends
AbstractPlugin
8
{
12
public
function
getMethod
()
13
{
14
return
'forceCopy'
;
15
}
16
27
public
function
handle
(
$path
, $newpath)
28
{
29
try
{
30
$deleted = $this->filesystem->delete($newpath);
31
}
catch
(
FileNotFoundException
$e) {
32
// The destination path does not exist. That's ok.
33
$deleted =
true
;
34
}
35
36
if
($deleted) {
37
return
$this->filesystem->copy(
$path
, $newpath);
38
}
39
40
return
false
;
41
}
42
}
League\Flysystem\Plugin\ForcedCopy\handle
handle($path, $newpath)
Copies a file, overwriting any existing files.
Definition:
ForcedCopy.php:27
$path
$path
Definition:
aliased.php:25
FileNotFoundException
League\Flysystem\Plugin\ForcedCopy
Definition:
ForcedCopy.php:7
League\Flysystem\Plugin\AbstractPlugin
Definition:
AbstractPlugin.php:8
League\Flysystem\Plugin
Definition:
AbstractPlugin.php:3
League\Flysystem\FileNotFoundException
Definition:
FileNotFoundException.php:7
php
League\Flysystem\Plugin\ForcedCopy\getMethod
getMethod()
Get the method name.string
Definition:
ForcedCopy.php:12
libs
composer
vendor
league
flysystem
src
Plugin
ForcedCopy.php
Generated on Thu Apr 17 2025 19:01:21 for ILIAS by
1.8.13 (using
Doxyfile
)