WP_Filesystem_Base::chown

Advertisement

Summery Summery

Changes the owner of a file or directory.

Syntax Syntax

WP_Filesystem_Base::chown( string $file, string|int $owner, bool $recursive = false )

Description Description

Default behavior is to do nothing, override this in your subclass, if desired.

Parameters Parameters

$file

(Required) Path to the file or directory.

$owner

(Required) A user name or number.

$recursive

(Optional) If set to true, changes file owner recursively.

Default value: false

Return Return

(bool) True on success, false on failure.

Source Source

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

	public function is_binary( $text ) {
		return (bool) preg_match( '|[^\x20-\x7E]|', $text ); // chr(32)..chr(127)
	}

Advertisement

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Advertisement

Leave a Reply