wp_is_writable

Determine if a directory is writable.

Description

wp_is_writable( (string) $path ); 

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

Parameters (1)

0. $path (string)
Path to check for write-ability.

Usage

  1. if ( !function_exists( 'wp_is_writable' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4. // Path to check for write-ability. 
  5. $path = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_is_writable($path); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function wp_is_writable( $path ) { 
  2. if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) 
  3. return win_is_writable( $path ); 
  4. else 
  5. return @is_writable( $path );