WP_Filesystem_SSH2::chgrp( string $file, string $group, bool $recursive = false )


Parameters

$file

(Required)

$group

(Required)

$recursive

(Optional)

Default value: false


Return

(bool)


Source

File: wp-admin/includes/class-wp-filesystem-ssh2.php

	public function chgrp($file, $group, $recursive = false ) {
		if ( ! $this->exists($file) )
			return false;
		if ( ! $recursive || ! $this->is_dir($file) )
			return $this->run_command(sprintf('chgrp %s %s', escapeshellarg($group), escapeshellarg($file)), true);
		return $this->run_command(sprintf('chgrp -R %s %s', escapeshellarg($group), escapeshellarg($file)), true);
	}