ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
CanCreateDirectoriesInDirectoryCondition.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ILIAS\Setup;
24 
26 {
27  public const PROBE_NAME = "probe_for_directory_creation";
28 
29  public function __construct(string $which)
30  {
31  return parent::__construct(
32  "Can create directories in '$which'",
33  function (Setup\Environment $env) use ($which): bool {
34  $probe = $which . "/" . self::PROBE_NAME;
35  if (!@mkdir($probe, 0774)) {
36  return false;
37  }
38  rmdir($probe);
39  return true;
40  },
41  "ILIAS needs to be able to create directories in '$which'."
42  );
43  }
44 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
Definition: Environment.php:27
__construct(Container $dic, ilPlugin $plugin)
A condition that can&#39;t be met by ILIAS itself needs to be met by some external means.