Function desfire::fs::does_file_exist

Function Documentation

result<bool> desfire::fs::does_file_exist(tag &tag, file_id fid)

Searches for a file id fid in the list of files of the current app. This method uses tag::get_file_ids to retrieve the list of files, therefore the app must allow directory access, either with the currently authenticated key or by having key_rights::dir_access_without_auth set to true. The caller is responsible for selecting the app and authenticating. No change in app and authentication is performed by this method.

Parameters:
  • tag – Tag on which to operate.

  • fid – File to search for.

Returns:

A boolean representing whether the file was found or not, or any error returned by tag::get_file_ids.