ILIAS  release_8 Revision v8.24
class.ilFile.php
Go to the documentation of this file.
1<?php
2/******************************************************************************
3 *
4 * This file is part of ILIAS, a powerful learning management system.
5 *
6 * ILIAS is licensed with the GPL-3.0, you should have received a copy
7 * of said license along with the source code.
8 *
9 * If this is not the case or you just want to try ILIAS, you'll find
10 * us at:
11 * https://www.ilias.de
12 * https://github.com/ILIAS-eLearning
13 *
14 *****************************************************************************/
21abstract class ilFile
22{
23 protected string $path;
24
28 public function deleteTrailingSlash(string $a_path): string
29 {
30 // DELETE TRAILING '/'
31 if (substr($a_path, -1) == '/' or substr($a_path, -1) == "\\") {
32 $a_path = substr($a_path, 0, -1);
33 }
34
35 return $a_path;
36 }
37}
Base class for all file (directory) operations This class is abstract and needs to be extended.
deleteTrailingSlash(string $a_path)
delete trailing slash of path variables
string $path