ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
CanCreateDirectoriesInDirectoryCondition.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
6 
7 use ILIAS\Setup;
8 
10 {
11  const PROBE_NAME = "probe_for_directory_creation";
12 
13  public function __construct($which)
14  {
15  return parent::__construct(
16  "Can create directories in '$which'",
17  function (Setup\Environment $env) use ($which) : bool {
18  $probe = $which . "/" . self::PROBE_NAME;
19  if (!@mkdir($probe, 0774)) {
20  return false;
21  }
22  rmdir($probe);
23  return true;
24  },
25  "ILIAS needs to be able to create directories in '$which'."
26  );
27  }
28 }
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:11
__construct(Container $dic, ilPlugin $plugin)
A condition that can&#39;t be met by ILIAS itself needs to be met by some external means.