Languages: English • Reference/wp is writable 日本語 (Add your language)
Determine if a path is writable. This is a wrapper function that detects if you're using Microsoft Windows, and uses the correct function for your OS.
<?php $is_writable = wp_is_writable($path); ?>
Can be used in your theme or plugin.
$path = WP_CONTENT . '/uploads'; if (wp_is_writable($path)){ // upload your file to here }
wp_is_writable is located in wp-includes/functions.php
.