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

Changes the owner of a file or directory.


Description

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


Top ↑

Parameters

$file string Required
Path to the file or directory.
$owner string|int Required
A user name or number.
$recursive bool Optional
If set to true, changes file owner recursively.

Default: false


Top ↑

Return

bool True on success, false on failure.


Top ↑

Source

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

public function chown( $file, $owner, $recursive = false ) {
	return false;
}

Top ↑

Changelog

Changelog
Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.