sc_select_file(3)

NAME
sc_select_file - select a file on a smart card

SYNOPSIS
#include <opensc.h>

int sc_select_file(sc_card_t *card,
                   const sc_path_t *path,
                   sc_file_t ** result);

DESCRIPTION
This function selects the file specified by path. If path specifies a file within the currently selected DF, sc_select_file will not select the MF first, but interpret the path relative to the current DF. It does this in order to prevent losing any authorizations previously established with the card (e.g. by presenting a PIN).

If result is not NULL, an sc_file(3) object is created, and the pointer to this object is stored in the location pointed to by result. This handle should later be released using sc_file_free(3).

RETURN VALUE
If an error occurred, a negative error code is returned, as described in sc_error(3). Otherwise, the function will return 0.

SEE ALSO
sc_file(3), sc_path(3), sc_establish_context(3), sc_file_free(3), sc_read_binary(3), sc_read_record(3), sc_delete_file(3), sc_list_files(3), sc_create_file(3).

AUTHOR
This manual page was written by Olaf Kirch <okir@suse.de>