.TH sc_list_files 3 "April 2003" "OpenSC Programmer's Manual .SH NAME sc_list_files \- list files on a smart card .SH SYNOPSIS .nf .B #include .sp .BI "int sc_list_files(sc_card_t *" card ", .BI " unsigned char *" buffer ", .BI " size_t " buflen "); .fi .SH DESCRIPTION This function lists all files in the currently selected DF, and stores the the file IDs as big-endian 16bit words in \fIbuffer\fP. If the supplied buffer is too small to hold all file IDs, the listing is silently truncated. .PP .SH RETURN VALUE If an error occurred, a negative error code is returned, as described in \fbsc_error\fP(3). Otherwise, the function will return the number of bytes stored in \fIbuffer\fP. .SH SEE ALSO .BR sc_file (3), .BR sc_path (3), .BR sc_establish_context (3), .BR sc_select_file (3), .BR sc_read_binary (3), .BR sc_read_record (3), .BR sc_delete_file (3), .BR sc_create_file (3), .BR sc_file_free (3). .SH AUTHOR This manual page was written by Olaf Kirch