Register paths to be published by the publish command.

@param  array $paths
@param  string $group
5758
protected function publishes( array $paths, $group = null )
	{
		$class = static::class;

		if ( !array_key_exists( $class, static::$publishes ) )
			static::$publishes[$class] = [];

		static::$publishes[$class] = array_merge( static::$publishes[$class], $paths );

		if ( $group )
		{
			if ( !array_key_exists( $group, static::$publishGroups ) )
				static::$publishGroups[$group] = [];

			static::$publishGroups[$group] = array_merge( static::$publishGroups[$group], $paths );
		}
	}
959723
protected function loadPath($path, $locale, $group)
    {
        $result = [];
        foreach ($this->paths as $path) {
            $result = array_merge($result, parent::loadPath($path, $locale, $group));
        }

        return $result;
    }
503590
private function loadPsr4Group($group)
    {
        if ( !isset($group['psr4']))
        {
            return;
        }

        foreach ($group['psr4'] as $prefix => $paths)
        {
            $this->objectRegistry->addPsr4($prefix, $paths);
        }
    }
359198
protected function loadPath($path, $locale, $group)
    {
        $result = parent::loadPath($path, $locale, $group);

        if (empty($result) && str_contains($locale, '-')) {
            return parent::loadPath($path, strstr($locale, '-', true), $group);
        }

        return $result;
    }
809927
public static function pathsToPublish($provider = null, $group = null)
    {
        if (! is_null($paths = static::pathsForProviderOrGroup($provider, $group))) {
            return $paths;
        }

        return collect(static::$publishes)->reduce(function ($paths, $p) {
            return array_merge($paths, $p);
        }, []);
    }
604708
protected function findInPaths(array $paths, $group, $mode = null, $exists = false)
    {
        $items = [];

        foreach ($paths as $path) {
            if ($this->fs->exists($file = "{$path}/{$group}.php")) {
                if ($exists) return true;

                $items = array_merge_recursive($this->fs->getRequire($file), $items);
            }

            if ($mode and $this->fs->exists($file = "{$path}/{$mode}/{$group}.php")) {
                if ($exists) return true;

                $items = array_merge_recursive($this->fs->getRequire($file), $items);
            }
        }

        return $items;
    }
859431
public function chgrp($pathname, $group)
    {
        if (false === @chgrp($pathname, $group)) { // FAILED.
            $msg = "FileSystem::chgrp() FAILED. Cannot chown $pathname. Group $group." . (isset($php_errormsg) ? ' ' . $php_errormsg : "");
            throw new IOException($msg);
        }
    }
356959
public static function register($path)
	{
		self::$_path = $path;
		self::addPath($path);

		if ($loaders = spl_autoload_functions())
			array_map('spl_autoload_unregister', $loaders);
		else
			$loaders = function_exists('__autoload') ? array('__autoload') : array();

		array_unshift($loaders, array(__CLASS__, 'load'));
		array_map('spl_autoload_register', $loaders);
	}
18729
public static void setGroup(FileSystem fs, Path path, String group) throws IOException {
    fs.setOwner(path, fs.getFileStatus(path).getOwner(), group);
  }
1351789
public function addSerializerGroup($group)
    {
        if (is_array($group)) {
            $this->serializerGroups = array_merge(
                $this->serializerGroups,
                $group
            );
        } else {
            $this->serializerGroups[$group] = $group;
        }
    }
971185
public static function addPath($path)
    {
        if (!in_array($path, self::$paths)) {
            array_unshift(self::$paths, $path);
        }
    }
306256
public function setPaths($paths)
    {
        if (!is_array($paths) && !$paths instanceof Traversable) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Invalid argument provided for $paths, expecting either an array or Traversable object, "%s" given',
                is_object($paths) ? get_class($paths) : gettype($paths)
            ));
        }

        $this->clearPaths();
        $this->addPaths($paths);
    }
1097713
protected function addGroups(Collection $groups)
    {
        foreach ($groups as $group) {
            $this->groups[] = $group->token;
            $this->addRoles($group->roles);
            $this->addPermissions($group->permissions);
        }
    }
1366965
public function addPath($path)
    {
        $paths = (array) $path;
        foreach ($paths as $path) {
            $this->paths[] = rtrim($path, "\\/") . DIRECTORY_SEPARATOR;
        }
    }
311545
public function addPath($path, $clearCache = true, $group = '__DEFAULT__')
	{
		//var_dump(func_get_args());
		$path = $this->normalizePath($path);

		// This is done for easy reference and
		// eliminates the need to check for doubles
		$this->paths[$group][$path] = $path;

		if ($clearCache)
		{
			$this->cache = [];
		}
	}
407682
public function removePath($path, $clearCache = true, $group = '__DEFAULT__')
	{
		$path = $this->normalizePath($path);

		if ($path and isset($this->paths[$group][$path]))
		{
			unset($this->paths[$group][$path]);

			if ($clearCache) $this->removePathCache($path);
		}
	}
276116
public function registerAnnotationsPathWithRegistry($path)
    {
        foreach (Finder::create()->files()->in($path) as $file) {
            AnnotationRegistry::registerFile($file->getRealPath());
        }

        return $this;
    }