Somes check about the property srcPath.

@param \stdClass $infos

@return boolean

@throws \Exception If a check fail
978972
protected function checkPropertySrcPath(\stdClass $infos): bool
    {
        if (!property_exists($infos, 'srcPath')) {
            throw new Exception(
                'srcPath must be present into bfwModulesInfos.json file'
                .' for the module '.$this->name,
                $this::ERR_LOAD_NO_PROPERTY_SRCPATH
            );
        }
        
        if (empty($infos->srcPath)) {
            throw new Exception(
                'srcPath property should not be empty into'
                .' bfwModulesInfos.json file for the module '.$this->name,
                $this::ERR_LOAD_EMPTY_PROPERTY_SRCPATH
            );
        }
        
        return true;
    }
1327423
protected function isConsole(File $phpCsFile, int $stackPointer): bool
    {
        return $this->extendsAbstract($phpCsFile, $stackPointer, 'Console');
    }
520289
private function _checkDir($filepath, $dirs)
    {
        $directory = dirname($filepath) . DS;
        $_directory = array();
        while (true) {
            // remember the directory to add it to _resource_dir in case we're successful
            $_directory[$directory] = true;
            // test if the directory is trusted
            if (isset($dirs[$directory])) {
                // merge sub directories of current $directory into _resource_dir to speed up subsequent lookup
                $dirs = array_merge($dirs, $_directory);

                return $dirs;
            }
            // abort if we've reached root
            if (!preg_match('#[\\\/][^\\\/]+[\\\/]$#', $directory)) {
                break;
            }
            // bubble up one level
            $directory = preg_replace('#[\\\/][^\\\/]+[\\\/]$#', DS, $directory);
        }

        // give up
        throw new SmartyException("directory '{$filepath}' not allowed by security setting");
    }
80409
protected function buildBlock($title, $informations)
    {
        $message = '<comment>'.$title.'</comment>';
        foreach ($informations as $name => $info) {
            $message .= PHP_EOL.sprintf('  <info>%-15s</info> %s', $name, $info);
        }

        return $message;
    }
1273822
public function check(array $folders)
    {
        foreach($folders as $folder => $permission)
        {
            if(!($this->getPermission($folder) >= $permission))
            {
                $this->addFileAndSetErrors($folder, $permission, false);
            }
            else {
                $this->addFile($folder, $permission, true);
            }
        }

        return $this->results;
    }
256970
public function setTemplateDir($dirs): Sdopx
    {
        $this->templateDirs = [];
        $this->templateJoined = '';
        if (empty($dirs)) {
            return $this;
        }
        if (is_string($dirs)) {
            $this->templateDirs[] = $dirs;
            return $this;
        } elseif (is_array($dirs)) {
            foreach ($dirs as $key => $value) {
                if (!is_string($value) || empty($value)) {
                    continue;
                }
                $this->templateDirs[$key] = $value;
            }
        }
        return $this;
    }
926899
public function isDirectory()
    {
        clearstatcache();
        $fs = FileSystem::getFileSystem();
        if ($fs->checkAccess($this) !== true) {
            throw new IOException("No read access to " . $this->path);
        }

        return @is_dir($this->path) && !@is_link($this->path);
    }
1084980
private function checkPaths()
    {
        if (!is_dir($this->sassPath)) {
            throw new \RuntimeException(sprintf('The path %s do not exists', $this->sassPath));
        }
        if (!is_dir($this->cssPath)) {
            try {
                mkdir($this->cssPath);
            } catch (\Exception $e) {
                throw new \RuntimeException(sprintf('The path %s do not exists, and could not be created', $this->cssPath));
            }
        }
        if (!is_writable($this->sassPath)) {
            throw new \RuntimeException(sprintf('The path %s should be writable (by the webserver user) for CompassElephant to compile the project', $this->sassPath));
        }
        if (!is_writable($this->cssPath)) {
            throw new \RuntimeException(sprintf('The path %s should be writable (by the webserver user) for CompassElephant to compile the project', $this->cssPath));
        }
    }
1255827
public static function check($path)
	{
		if (strpos($path, '..') !== false)
		{
			throw new FilesystemException(
				sprintf(
					'%s() - Use of relative paths not permitted',
					__METHOD__
				),
				20
			);
		}

		$path = static::clean($path);

		if ((JPATH_ROOT != '') && strpos($path, static::clean(JPATH_ROOT)) !== 0)
		{
			throw new FilesystemException(
				sprintf(
					'%1$s() - Snooping out of bounds @ %2$s',
					__METHOD__,
					$path
				),
				20
			);
		}

		return $path;
	}
234675
private static function searchPath($prefix, $path, $conditions)
	{
		$result = [];
		
		$dir = new DirectoryIterator($path);
		foreach ( $dir as $entry ) {
			if ( $entry->isDot() ) {
				continue;
			}
			
			$de = $entry->getFilename();
			
			if ( $entry->isDir() && preg_match('/^[A-Za-z_]+$/', $de) ) {
				// it's a subdirectory, search it
				$result = array_merge($result, self::searchPath("$prefix\\$de", $path . DIRECTORY_SEPARATOR . $de, $conditions));
			}
			else if ( preg_match('/\.php$/', $de) ) {
				// FIXME I'm using a regex test here because that in theory is quicker than having
				// PHP parse the file. Also, this is deliberately designed to exclude abstract classes,
				// which will cause class_exists() to return (bool)true.
				
				$foundNamespace = $foundClass = false;
				$className = preg_replace('/\.php$/', '', $de);
				
				if ( $fp = @fopen($filePath = "$path/$de", 'r') ) {
					
					while ( !feof($fp) && ($line = fgets($fp)) ) {
						// FIXME PHP leaves pretty little room for error in the namespace declaration
						// line. This is still a little needlessly picky - if someone has a space between
						// the namespace name and the semicolon this test will fail, as well as dumber
						// stuff like the word "namespace" being mixed case/uppercase.
						if ( trim($line) === "namespace $prefix;" ) {
							$foundNamespace = true;
						}
						// This fairly complicated regexp covers "implements" with multiple inheritance,
						// "extends" and a fair amount of syntactical deviation.
						else if ( preg_match('/^\s*class ([A-Za-z0-9_]+)(?:\s+(?:extends|implements) [A-Za-z0-9_\\\\]+(?:\s*,\s*[A-Za-z0-9_]+)*)*\s*[\{,]?$/', trim($line), $match)
								&& ($match[1] === "\\$prefix\\$className" || $match[1] === $className) ) {
							$foundClass = true;
						}
						
						// if we have found the namespace declaration and the class declaration,
						// we no longer need any more information from this file, so break and
						// close the handle.
						if ( $foundNamespace && $foundClass ) {
							break;
						}
					}
					
					fclose($fp);
				}
				
				// if we found the namespace declaration and the class declaration, append
				// the discovered class to the result list.
				if ( $foundNamespace && $foundClass )
				{
					// fully qualified class name
					$fqcn = "$prefix\\$className";
					
					// conditions are an OR between each, AND within an individual condition
					$condCount = 0;
					
					// ReflectionClass instance - created only if necessary
					$rfl = null;
					foreach ( $conditions as $cond ) {
						$condResult = true;
						foreach ( $cond as $test => $value ) {
							switch($test) {
							case 'implements':
								if ( empty($rfl) ) {
									$rfl = new \ReflectionClass($fqcn);
								}
								if ( !$rfl->implementsInterface($value) ) {
									$condResult = false;
									break 2; // lazy evaluation
								}
								break;
							case 'extends':
								if ( empty($rfl) ) {
									$rfl = new \ReflectionClass($fqcn);
								}
								if ( $rfl->getParentClass()->getName() !== $value ) {
									$condResult = false;
									break 2; // lazy evaluation
								}
								break;
							case 'abstract':
								if ( empty($rfl) ) {
									$rfl = new \ReflectionClass($fqcn);
								}
								if ( $rfl->isAbstract() !== $value ) {
									$condResult = false;
									break 2; // lazy evaluation
								}
								break;
							}
						}
						if ( $condResult ) {
							$condCount++;
						}
					}
					
					if ( $condCount || count($conditions) === 0 ) {
						$result[] = $fqcn;
					}
				}
			}
		}
		
		return $result;
	}
420717
public function findPHPFilesByPath(
        string $path,
        array $excludes
    ) {
        $finder = new Finder();

        if (file_exists($path) && !is_dir($path)) {
            $finder->append([0 => $path]);
        } else {
            $finder
                ->files()
                ->in($path)
                ->exclude($excludes)
                ->name('*.php');
        }

        return $finder;
    }
1288100
public function IsInCategoryPath($sCategoryId)
    {
        $oBreadCrumb = $this->GetBreadcrumb();
        $oMatchingNode = $oBreadCrumb->FindItemWithProperty('id', $sCategoryId);
        if ($oMatchingNode) {
            return true;
        } else {
            return false;
        }
    }
63859
public static function copy($src, $dest, $force = false)
    {
        @set_time_limit((int) ini_get('max_execution_time'));

        // Eliminate trailing directory separators, if any
        $src = rtrim($src, '/\\');
        $dest = rtrim($dest, '/\\');

        if (!is_dir($src)) {
            throw new FilesystemException('Source folder not found', -1);
        }

        if (is_dir($dest) && !$force) {
            throw new FilesystemException('Destination folder exists', -1);
        }

        // Make sure the destination exists
        if (!static::create($dest)) {
            throw new FilesystemException('Cannot create destination folder', -1);
        }

        $sources = static::items($src, true, static::PATH_RELATIVE);

        // Walk through the directory copying files and recursing into folders.
        foreach ($sources as $file) {
            $srcFile = $src . '/' . $file;
            $destFile = $dest . '/' . $file;

            if (is_dir($srcFile)) {
                static::create($destFile);
            } elseif (is_file($srcFile)) {
                File::copy($srcFile, $destFile, $force);
            }
        }

        return true;
    }
305916
public function pathExists($path = '', $public = true)
    {
        $path = $this->getStoragePath($path);

        return $this->_storage->exists($path, $public);
    }
1150756
public static function checkPath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(sprintf("String expected as path, got '%s' instead", gettype($path)));
        }
        if (!file_exists($path)) {
            throw new InvalidArgumentException(sprintf("'%s' does not exist", $path));
        }

        if (!is_dir($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not a directory", $path));
        }

        if (!is_readable($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not readable", $path));
        }

        return true;
    }
723008
public function isDirty($attributes = null)
    {
        return parent::isDirty($attributes) or
        $this->getSource()->isDirty($attributes);
    }
330919
protected function includePathInfo(Infoset $info) {
		$list = $this->createList();
		$list->setTitle('Include path');
		
		$include = explode(PATH_SEPARATOR, get_include_path());
		
		foreach ($include as $path) {
			$list[] = $path;
		}
		
		$info[] = $list;
	}