WP_Filesystem_Base::exists

Advertisement

Summery Summery

Checks if a file or directory exists.

Syntax Syntax

WP_Filesystem_Base::exists( string $file )

Parameters Parameters

$file

(Required) Path to file or directory.

Return Return

(bool) Whether $file exists or not.

Source Source

File: wp-admin/includes/class-wp-filesystem-base.php

	 * @param string|false $type      Type of resource. 'f' for file, 'd' for directory.
	 *                                Default false.
	 * @return bool True on success, false on failure.

Advertisement

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Advertisement

Leave a Reply