ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilTestProcessLockFileStorage.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/FileSystem/classes/class.ilFileSystemStorage.php';
5 
13 {
17  public function __construct($activeId)
18  {
19  parent::__construct(ilFileSystemStorage::STORAGE_DATA, true, $activeId);
20  }
21 
30  protected function getPathPrefix()
31  {
32  return 'ilTestProcessLocks';
33  }
34 
44  protected function getPathPostfix()
45  {
46  return 'active';
47  }
48 
49  public function create()
50  {
51  set_error_handler(function ($severity, $message, $file, $line) {
52  throw new ErrorException($message, $severity, 0, $file, $line);
53  });
54 
55  try {
57  restore_error_handler();
58  } catch (Exception $e) {
59  restore_error_handler();
60  }
61 
62  if (!file_exists($this->getPath())) {
63  throw new ErrorException(sprintf('Could not find directory: %s', $this->getPath()));
64  }
65 
66  return true;
67  }
68 }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
catch(Exception $e) $message
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file