wp_is_writable()WP 3.6.0

Determines if a directory is writable.

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

No Hooks.

Returns

true|false. Whether the path is writable.

Usage

wp_is_writable( $path );
$path(string) (required)
Path to check for write-ability.

Notes

Changelog

Since 3.6.0 Introduced.

wp_is_writable() code WP 7.0

function wp_is_writable( $path ) {
	if ( 'Windows' === PHP_OS_FAMILY ) {
		return win_is_writable( $path );
	}

	return @is_writable( $path );
}