PHPMailer\PHPMailer
PHPMailer::fileIsAccessible
Check whether a file path is safe, accessible, and readable.
Method of the class: PHPMailer{}
No Hooks.
Returns
true|false.
Usage
$result = PHPMailer::fileIsAccessible( $path );
- $path(string) (required)
- A relative or absolute path to a file.
PHPMailer::fileIsAccessible() PHPMailer::fileIsAccessible code WP 6.9.1
protected static function fileIsAccessible($path)
{
if (!static::isPermittedPath($path)) {
return false;
}
$readable = is_file($path);
//If not a UNC path (expected to start with \\), check read permission, see #2069
if (strpos($path, '\\\\') !== 0) {
$readable = $readable && is_readable($path);
}
return $readable;
}