WP_Filesystem_SSH2::put_contents( string $file, string $contents, bool|int $mode = false )


Parameters

$file

(Required)

$contents

(Required)

$mode

(Optional)

Default value: false


Return

(bool)


Source

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

	public function put_contents($file, $contents, $mode = false ) {
		$ret = file_put_contents( $this->sftp_path( $file ), $contents );

		if ( $ret !== strlen( $contents ) )
			return false;

		$this->chmod($file, $mode);

		return true;
	}