wp_is_writable( string $path ): bool

Determines if a directory is writable.


Description

This function is used to work around certain ACL issues in PHP primarily affecting Windows Servers.

Top ↑

See also


Top ↑

Parameters

$path string Required
Path to check for write-ability.

Top ↑

Return

bool Whether the path is writable.


Top ↑

Source

File: wp-includes/functions.php. View all references

function wp_is_writable( $path ) {
	if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) {
		return win_is_writable( $path );
	} else {
		return @is_writable( $path );
	}
}


Top ↑

Changelog

Changelog
Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes

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