original_string: public function chgrp($files, $group, $recursive = false)
      {
          foreach ($this->toIterable($files) as $file) {
              if ($recursive && is_dir($file) && !is_link($file)) {
                  $this->chgrp(new \FilesystemIterator($file), $group, true);
              }
              if (is_link($file) && \function_exists('lchgrp')) {
                  if (true !== @lchgrp($file, $group)) {
                      throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
                  }
              } else {
                  if (true !== @chgrp($file, $group)) {
                      throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
                  }
              }
          }
      }
code: public function chgrp($files, $group, $recursive = false)
      {
          foreach ($this->toIterable($files) as $file) {
              if ($recursive && is_dir($file) && !is_link($file)) {
                  $this->chgrp(new \FilesystemIterator($file), $group, true);
              }
              if (is_link($file) && \function_exists('lchgrp')) {
                  if (true !== @lchgrp($file, $group)) {
                      throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
                  }
              } else {
                  if (true !== @chgrp($file, $group)) {
                      throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
                  }
              }
          }
      }
code_tokens: public function chgrp ( $ files , $ group , $ recursive = false ) { foreach ( $ this -> toIterable ( $ files ) as $ file ) { if ( $ recursive && is_dir ( $ file ) && ! is_link ( $ file ) ) { $ this -> chgrp ( new \ FilesystemIterator ( $ file ) , $ group , true ) ; } if ( is_link ( $ file ) && \ function_exists ( 'lchgrp' ) ) { if ( true !== @ lchgrp ( $ file , $ group ) ) { throw new IOException ( sprintf ( 'Failed to chgrp file "%s".' , $ file ) , 0 , null , $ file ) ; } } else { if ( true !== @ chgrp ( $ file , $ group ) ) { throw new IOException ( sprintf ( 'Failed to chgrp file "%s".' , $ file ) , 0 , null , $ file ) ; } } } }
docstring: Change the group of an array of files or directories.
  
  @param string|iterable $files     A filename, an array of files, or a \Traversable instance to change group
  @param string          $group     The group name
  @param bool            $recursive Whether change the group recursively or not
  
  @throws IOException When the change fails
docstring_tokens: Change the group of an array of files or directories .