ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestProcessLockFileStorage Class Reference
+ Inheritance diagram for ilTestProcessLockFileStorage:
+ Collaboration diagram for ilTestProcessLockFileStorage:

Public Member Functions

 __construct (int $contextId)
 
 create ()
 
- Public Member Functions inherited from ilFileSystemAbstractionStorage
 __construct (int $a_storage_type, bool $a_path_conversion, int $a_container_id)
 Constructor. More...
 
 fileExists (string $a_absolute_path)
 
 getContainerId ()
 
 writeToFile (string $a_data, $a_absolute_path)
 
 copyFile (string $a_from, string $a_to)
 
 create ()
 
 getAbsolutePath ()
 Calculates the full path on the filesystem. More...
 
 delete ()
 
 deleteDirectory (string $a_abs_name)
 
 deleteFile (string $a_abs_name)
 
 appendToPath (string $a_appendix)
 
 getStorageType ()
 
 getPath ()
 

Protected Member Functions

 getPathPrefix ()
 Get path prefix. More...
 
 getPathPostfix ()
 Get directory name. More...
 
- Protected Member Functions inherited from ilFileSystemAbstractionStorage
 getLegacyFullAbsolutePath (string $relative_path)
 
 getFileSystemService ()
 
 getPathPrefix ()
 Get path prefix. More...
 
 getPathPostfix ()
 Get directory name. More...
 
 getLegacyAbsolutePath ()
 Calculates the absolute filesystem storage location. More...
 
 init ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFileSystemAbstractionStorage
static createPathFromId (int $a_container_id, string $a_name)
 
static _copyDirectory (string $a_sdir, string $a_tdir)
 
- Data Fields inherited from ilFileSystemAbstractionStorage
const STORAGE_WEB = 1
 
const STORAGE_DATA = 2
 
const STORAGE_SECURED = 3
 
- Protected Attributes inherited from ilFileSystemAbstractionStorage
string $path = null
 
ILIAS Filesystem Filesystems $file_system_service
 

Detailed Description

Definition at line 24 of file class.ilTestProcessLockFileStorage.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestProcessLockFileStorage::__construct ( int  $contextId)

Member Function Documentation

◆ create()

ilTestProcessLockFileStorage::create ( )

Definition at line 58 of file class.ilTestProcessLockFileStorage.php.

References Vendor\Package\$e, $message, ilFileSystemAbstractionStorage\getFileSystemService(), ilFileSystemAbstractionStorage\getPath(), and ILIAS\GlobalScreen\has().

58  : void
59  {
60  set_error_handler(function ($severity, $message, $file, $line): void {
61  throw new ErrorException($message, $severity, 0, $file, $line);
62  });
63 
64  try {
65  parent::create();
66  restore_error_handler();
67  } catch (Exception $e) {
68  restore_error_handler();
69  }
70 
71  if (!$this->getFileSystemService()->has($this->path)) {
72  throw new ErrorException(sprintf('Could not find directory: %s', $this->getPath()));
73  }
74  }
has(string $class_name)
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:

◆ getPathPostfix()

ilTestProcessLockFileStorage::getPathPostfix ( )
protected

Get directory name.

E.g for files => file Only relative path, no trailing slash '_<obj_id>' will be appended automatically

protected

Returns
string directory name

Definition at line 53 of file class.ilTestProcessLockFileStorage.php.

53  : string
54  {
55  return 'context';
56  }

◆ getPathPrefix()

ilTestProcessLockFileStorage::getPathPrefix ( )
protected

Get path prefix.

Prefix that will be prepended to the path No trailing slash. E.g ilFiles for files

protected

Returns
string path prefix e.g files

Definition at line 39 of file class.ilTestProcessLockFileStorage.php.

39  : string
40  {
41  return 'ilTestProcessLocks';
42  }

The documentation for this class was generated from the following file: