Determines if a path should be ignored.

@param  $path
@return bool
168485
private function shouldBeIgnored($path)
    {
        $path = $this->normalizePath($path);

        if ($this->isAutomaticallyIgnored($path)) {
            return true;
        }

        foreach ($this->ignoredPaths as $ignoredPath) {
            if (Str::is($this->normalizePath($ignoredPath), $path)) {
                return true;
            }
        }

        return false;
    }
992453
private function isAutomaticallyIgnored($path)
    {

        if (!$this->insideTemplateDirectory) {
            // Determine if the provided file is a composer.json file
            // that should be ignored automatically.
            if (!Str::startsWith('_template', $path) && $path == 'composer.json') {
                return true;
            }
        }

        foreach ($this->automaticallyResolvedIgnoredPaths as $ignoredPath) {
            if (Str::is($this->normalizePath($ignoredPath), $path)) {
                return true;
            }
        }

        return false;
    }
806110
public static function isDirEmpty(string $path) : bool
    {
        //che if no such dir, not a dir, not readable
        if (!self::isReadable($path)) {
            return false;
        }

        $result = true;
        $handle = opendir($path);
        while (false !== ($entry = readdir($handle))) {
            if (!self::isDotDir($entry)) {
                $result = false;
                break;
            }
        }
        closedir($handle);
        return $result;
    }
1002209
public function has($path) {
        $mapping = $this->mapper->get($path);

        if (!$mapping) {
            return false;
        }

        return $this->client->has($mapping['fid']);
    }
829500
protected function checkPath($path) {
		if (is_dir($path)) {
			return true;
		}

		if (mkdir($path, 0755, true)) {
			return true;
		} else {
			$this->error = "目录 {$path} 创建失败！";
			return false;
		}
	}
529871
public static function isAllowedAbsPath($path) {
		if (self::isAbsPath($path) &&
				self::validPathStr($path) &&
				(self::isFirstPartOfStr($path, PATH_site)
						||
						($GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && self::isFirstPartOfStr($path, $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']))
				)
		) {
			return TRUE;
		}
	}
695532
private function should_ignore() {
        $parts = explode('.', $this->relative_path);
        $ext = strtolower(end($parts));
        return in_array($ext, $this->should_ignore_extensions);
    }
89666
public function has($path)
    {
        $location = $this->applyPathPrefix($path);

        if ($this->s3Client->doesObjectExist($this->bucket, $location, $this->options)) {
            return true;
        }

        return $this->doesDirectoryExist($location);
    }
20707
def path_is_ignored(self, path):
        
        try:
            self.run('check-ignore', '--quiet', path)
        except CommandError as e:
            if e.retcode == 1:
                # path is ignored
                return False
            else:
                # fatal error
                raise e
        return True
1151546
public function has($path)
    {
        $x = $this->xpath($path);

        return count($x) ? true : false;
    }
743745
def is_excluded(self, path, exclude=None):
        
        for pattern in (exclude or self.exclude_pattern):
            if path.match(pattern):
                return True
        else:
            return False
1020383
public function isPathCovered($path)
    {
        foreach ($this->patterns as $pattern) {
            if (1 === preg_match('{'.$pattern.'}', $path)) {
                return true;
            }
        }
        return false;
    }
732190
public function checkPath($path)
    {
        $path = realpath($path);

        return ($path !== false && is_dir($path)) ? $path : false;
    }
1129836
public function isBoolean($path)
    {
        $value = $this->get($path, $this);

        return $value === $this ? false : is_bool($value);
    }
313827
protected function checkPath( $path ) {
		$iterator = new RecursiveIteratorIterator(
			new RecursiveCallbackFilterIterator(
				new RecursiveDirectoryIterator( $path ),
				[ $this, 'filterDirs' ]
			)
		);
		$bad = [];
		/** @var SplFileInfo $file */
		foreach ( $iterator as $file ) {
			// Skip directories
			if ( !$file->isFile() ) {
				continue;
			}

			// Skip whitelisted files
			if ( in_array( $file->getPathname(), $this->ignoredFiles ) ) {
				$this->progress( 'S' );
				continue;
			}

			if ( !$file->isExecutable() ) {
				$this->progress( '.' );
				continue;
			}

			if ( !$this->checkFile( $file ) ) {
				$this->progress( 'E' );
				$bad[] = $file;
			} else {
				$this->progress( '.' );
			}
		}

		return $bad;
	}
1200414
public function ignorePath($path)
    {
        if (is_array($path)) {
            foreach ($path as $pathToIgnore) {
                $this->ignorePath($pathToIgnore);
            }

            return $this;
        }

        $this->ignoredPaths[] = $path;
        return $this;
    }
475513
public function isRelativePath($path)
    {
        if (strlen($path) === 0) {
            return true;
        }

        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            return !preg_match('/^[a-z]+\:\\\\/i', $path);
        }

        return strpos($path, DIRECTORY_SEPARATOR) !== 0;
    }