@param string $fullPath

@return void
181264
protected function createDirectoryIfNotExists(string $fullPath)
    {
        $dirName = dirname($fullPath);
        if (!@is_dir($dirName)) {
            @mkdir($dirName, 0777, true);
        }
    }
1351023
protected static function _getFile($fullPath) {
        $file = '';
        if (preg_match('/\/(_[A-Z].[A-Za-z]+)\.php$/', $fullPath, $matches)) {
            $file = isset($matches) && isset($matches[1]) ? $matches[1] : $file;
            self::$numFileLogs = 0;
        } else {
            switch (self::$numFileLogs) {
                case 0:
                    self::_doLog('Unable to get filename for: ' . $fullPath);
                    break;

                case 1:
                    self::_doLog('MULTIPLE ERRORS ENCOUNTERED GETTING FILE NAMES (no more will be logged): ' . $fullPath);
                    break;

                default:
                    break;
            }
            self::$numFileLogs++;
        }
        return $file;
    }
146592
public function isFullPath($routes)
    {
        $routes = is_array($routes) ? $routes : func_get_args();

        return call_user_func_array([$this->request, 'fullUrlIs'], $routes);
    }
836691
public function updatePath($oldPath, $newPath)
    {
        if ($this->contains($oldPath)) {
            $this->items[$newPath] = $this->items[$oldPath];
            unset($this->items[$oldPath]);
        }
    }
738647
protected function getResourceInfo($fullPathName)
  {
    foreach ($this->resourceFilesInfo as $info)
    {
      if ($info['full_path_name']===$fullPathName)
      {
        return $info;
      }
    }

    $this->logError("Unknown resource file '%s'", $fullPathName);

    return null;
  }
1226727
protected function addTemplateFile($filename, $destination, $fullPath = false)
	{
		$this->templateFiles[] = array(
			'path'        => ((!$fullPath) ? __DIR__ . DS . 'Scaffolding' . DS . 'Templates' . DS . $filename : $filename),
			'destination' => $destination
		);

		return $this;
	}
723235
public function save($path, $fullPath = false)
    {
        if ( !$fullPath ) {

            // var_dump( [ $this->getWidth(), $this->getHeight() ] );
            $path = sprintf( '%s/%s', $this->cropsFolder, basename( $path ) );

        }

        if ($path == $this->originalImagePath) {
            throw new \Exception( 'You are not allowed to overwrite original image. Select another save path.' );
        }

        // var_dump( $path );
        $returnValue = parent::save( $path );

        // Reset
        $this->reset();

        // Return $this-> from parent
        return $returnValue;
    }
97893
public function cleanup($full=false) {
        global $USER, $CFG;

        if ($full) {
            @remove_dir($CFG->tempdir.'/csvimport/'.$this->_type.'/'.$USER->id);
        } else {
            @unlink($CFG->tempdir.'/csvimport/'.$this->_type.'/'.$USER->id.'/'.$this->_iid);
        }
    }
628202
public function setToolpath($path)
    {
        if (!file_exists($path)) {
            $fs = FileSystem::getFileSystem();
            $fullpath = $fs->which($path);
            if ($fullpath === false) {
                throw new BuildException(
                    'Tool does not exist. Path: ' . $path
                );
            }
            $path = $fullpath;
        }
        if (!is_executable($path)) {
            throw new BuildException(
                'Tool not executable. Path: ' . $path
            );
        }
        $this->toolPath = $path;
    }
1073667
public function addHelperPath(string $path): void
    {
        $class = static::class;
        $realPath = realpath($path);

        if (false === $realPath) {
            throw new CommonException("Invalid Helper path `$path` for class `$class`");
        }

        // create store of helpers
        if (!isset(static::$helpersPath[$class])) {
            static::$helpersPath[$class] = [];
        }

        if (!\in_array($realPath, static::$helpersPath[$class], true)) {
            static::$helpersPath[$class][] = $realPath;
        }
    }
230932
protected function pathChanged($oldPath)
    {
        foreach ($this->pathListeners as $cb) {
            $cb($oldPath, $this->path);
        }
    }
661496
private function deleteDirByFullPath($path, $delete_self = true, array $exclude = [])
    {
        $dir = $this->withSlash($path);

        if ($dh = opendir($dir)) {
            while ($file = readdir($dh)) {
                if (($file != '.') && ($file != '..')) {
                    $fullpath = $dir . $file;

                    if (!$delete_self && in_array($fullpath, $exclude)) {
                        continue;
                    }

                    if (is_link($fullpath)) {
                        unlink($fullpath);
                    } else {
                        if (is_dir($fullpath)) {
                            $this->deleteDirByFullPath($fullpath);
                        } else {
                            unlink($fullpath);
                        }
                    }
                }
            }

            closedir($dh);
        }

        if ($delete_self) {
            rmdir($dir);
        }
    }
1312839
protected static function getFileImprint ($fullPath) {
		$fileChecking = self::$globalOptions['fileChecking'];
		if ($fileChecking == 'filemtime') {
			return filemtime($fullPath);
		} else {
			return (string) call_user_func($fileChecking, $fullPath);
		}
	}
1278694
protected function generateFullPath()
    {
        return $this->fullPath = $this->pathGenerator
            ->generatePath($this->page, $this->path ?: '')
        ;
    }
1362023
public function enterStatic(StaticPath $path): void
    {
        if ($this->done) {
            return;
        }

        $this->uri .= $path->getStatic();
    }
624294
protected function delete_file_by_path(\repository_onedrive\rest $client, $fullpath) {
        try {
            $response = $client->call('delete_file_by_path', ['fullpath' => $fullpath]);
        } catch (\core\oauth2\rest_exception $re) {
            return false;
        }
        return true;
    }
20872
public static function permission($path, $full = false)
    {
        if (self::exists($path) === false) {
            return false;
        }

        $perms = fileperms($path);

        if ($full !== true) {
            return substr(sprintf('%o', $perms), -4);
        }

        if (($perms & 0xC000) === 0xC000) {
            $info = 's';
        } elseif (($perms & 0xA000) === 0xA000) {
            $info = 'l';
        } elseif (($perms & 0x8000) === 0x8000) {
            $info = '-';
        } elseif (($perms & 0x6000) === 0x6000) {
            $info = 'b';
        } elseif (($perms & 0x4000) === 0x4000) {
            $info = 'd';
        } elseif (($perms & 0x2000) === 0x2000) {
            $info = 'c';
        } elseif (($perms & 0x1000) === 0x1000) {
            $info = 'p';
        } else {
            $info = 'u';
        }

        $info .= $perms & 0x0100 ? 'r' : '-';
        $info .= $perms & 0x0080 ? 'w' : '-';
        $info .= $perms & 0x0040 ?
                    ($perms & 0x0800 ? 's' : 'x') :
                        ($perms & 0x0800 ? 'S' : '-');

        $info .= $perms & 0x0020 ? 'r' : '-';
        $info .= $perms & 0x0010 ? 'w' : '-';
        $info .= $perms & 0x0008 ?
                    ($perms & 0x0400 ? 's' : 'x') :
                        ($perms & 0x0400 ? 'S' : '-');

        $info .= $perms & 0x0004 ? 'r' : '-';
        $info .= $perms & 0x0002 ? 'w' : '-';
        $info .= $perms & 0x0001 ?
                    ($perms & 0x0200 ? 't' : 'x') :
                        ($perms & 0x0200 ? 'T' : '-');

        return $info;

    }