ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
CanCreateFilesInDirectoryCondition.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Setup\Condition
;
22
23
use
ILIAS\Setup
;
24
25
class
CanCreateFilesInDirectoryCondition
extends
ExternalConditionObjective
26
{
27
public
const
PROBE_NAME
=
"probe_for_file_creation"
;
28
29
public
function
__construct
(
string
$which)
30
{
31
return
parent::__construct
(
32
"Can create files in '$which'"
,
33
function
(
Setup
\
Environment
$env) use ($which):
bool
{
34
$probe = $which .
"/"
.
self::PROBE_NAME
;
35
if
(!@file_put_contents($probe, self::PROBE_NAME)) {
36
return
false
;
37
}
38
$success = @file_get_contents($probe) ==
self::PROBE_NAME
;
39
unlink($probe);
40
return
$success;
41
},
42
"ILIAS needs to be able to create files in '$which'."
43
);
44
}
45
}
ILIAS\Setup\Condition\CanCreateFilesInDirectoryCondition
Definition:
CanCreateFilesInDirectoryCondition.php:26
ILIAS\Setup\Condition\CanCreateFilesInDirectoryCondition\__construct
__construct(string $which)
Definition:
CanCreateFilesInDirectoryCondition.php:29
ILIAS\Setup\Condition\CanCreateFilesInDirectoryCondition\PROBE_NAME
const PROBE_NAME
Definition:
CanCreateFilesInDirectoryCondition.php:27
ILIAS\Setup\Condition\ExternalConditionObjective
A condition that can't be met by ILIAS itself needs to be met by some external means.
Definition:
ExternalConditionObjective.php:33
ILIAS\Setup
Definition:
Setup.php:26
ILIAS\Setup\Environment
An environment holds resources to be used in the setup process.
Definition:
Environment.php:28
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Definition:
PluginProviderHelper.php:38
ILIAS\Setup\Condition
Definition:
CanCreateDirectoriesInDirectoryCondition.php:21
ILIAS\Setup
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilMysqlMyIsamToInnoDbMigration.php:19
components
ILIAS
Setup
src
Condition
CanCreateFilesInDirectoryCondition.php
Generated on Sat Oct 18 2025 23:03:40 for ILIAS by
1.9.4 (using
Doxyfile
)