WP_Filesystem_SSH2::owner

Advertisement

Summery Summery

Gets the file owner.

Syntax Syntax

WP_Filesystem_SSH2::owner( string $file )

Parameters Parameters

$file

(Required) Path to the file.

Return Return

(string|false) Username of the owner on success, false on failure.

Source Source

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

	 *
	 * @param string $file Path to the file.
	 * @return string|false Username of the owner on success, false on failure.
	 */
	public function owner( $file ) {
		$owneruid = @fileowner( $this->sftp_path( $file ) );

		if ( ! $owneruid ) {
			return false;
		}

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply