WP_Filesystem_Direct::exists()publicWP 2.5.0

Checks if a file or directory exists.

Метод класса: WP_Filesystem_Direct{}

Хуков нет.

Возвращает

true|false. Whether $path exists or not.

Использование

$WP_Filesystem_Direct = new WP_Filesystem_Direct();
$WP_Filesystem_Direct->exists( $path );
$path(строка) (обязательный)
Path to file or directory.

Список изменений

С версии 2.5.0 Введена.

Код WP_Filesystem_Direct::exists() WP 6.4.3

public function exists( $path ) {
	return @file_exists( $path );
}