SD - exists()

Tests whether a file or directory exists on the SD card.

Syntax

SD.exists(filename)

Parameters

  • filename: the name of the file to test for existence, which can include directories (delimited by forward-slashes, /).

Returns

1 if the file or directory exists, 0 if not.

See also