@param $path

@return bool
559969
protected function matchEnvironment($path) {
        $env = $this->getEnvironmentDetector()
            ->detectEnvironment(basename($path));

        if ($env === null || $env == $this->getEnvironment()) {
            return true;
        }

        return false;
    }
1142068
public function itemExists($path)
    {
        try {
            $this->getMetadata($path);
        } catch (ClientException $e) {
            if ($e->getResponse()->getStatusCode() == '404') {
                return false;
            }

            throw $e;
        }

        return true;
    }
1352613
public function delete($path)
    {
        $location = $this->applyPathPrefix($path);

        try {
            $this->share->del($location);
        } catch (NotFoundException $e) {
            return false;
        } catch (InvalidTypeException $e) {
            return false;
        }

        return true;
    }
570917
public function has($path)
    {
        list($prefix, $path) = $this->getPrefixAndPath($path);

        return $this->getFilesystem($prefix)->has($path);
    }
197501
protected function validatePath($path)
    {
        if (empty($path)) {
            return false;
        }

        // we are always operating from root directory
        // so forbid relative paths
        if (false !== strpos($path, '..')) {
            return false;
        }

        return true;
    }
24632
public function exists(string $path): bool
    {
        $path = $this->normalizePath($path);

        return strlen($path) === 0 ? false : $this->getAdapter()->exists($path);
    }
1151546
public function has($path)
    {
        $x = $this->xpath($path);

        return count($x) ? true : false;
    }
538576
public function has($path)
    {
        $location = $this->applyPathPrefix($path);
        return $this->ossClient->doesObjectExist($this->bucket, $location);
    }
1134637
public function delete($path)
    {
        try {
            $response = $this->api->deleteResources([$path]);

            return $response['deleted'][$path] === 'deleted';
        } catch (Api\Error $e) {
            return false;
        }
    }
1206625
public function hasSetting($path)
    {
        $value = $this->resolvePath($path);
    
        if ($value === null) {
            return false;
        }
        
        return true;
    }
793260
public function isValidPath($path)
    {
        $isValidPath = false;

        $pathValue = $this->getValueByPath($path);
        if (!is_null($pathValue)) {
            $isValidPath = true;
        }

        return $isValidPath;
    }
627818
public function has($path)
    {
        $file_stat = $this->getMetadata($path);
        return !empty($file_stat) ? true : false;
    }
179590
public static function delete($path)
	{
		if (is_dir($path)) {
			Dir::delete($path);
		} elseif (is_file($path)) {
			File::delete($path);
		}

		return true;
	}
1080773
public function delete($path)
    {
        return (bool) $this->normalizeResponse(
            $this->cosApi->delFile($this->getBucket(), $path)
        );
    }
940475
public function exists($path)
	{
		$path = Util::normalizePath($path);

		return (bool) $this->adapter->exists($path);
	}
669931
public static function isAbsolutePath($path)
    {
        if (isset($path[0]) and ($path[0] == '/' or $path[0] == '\\')) {
            return true;
        }
        if (preg_match('/^[A-Za-z0-9]+:/', $path) === 1) {
            return true;
        }
        return false;
    }
1129836
public function isBoolean($path)
    {
        $value = $this->get($path, $this);

        return $value === $this ? false : is_bool($value);
    }