opensc/man/sc_file.3

66 lines
1.7 KiB
Groff

.TH sc_file 3 "April 2003" "OpenSC Programmer's Manual
.SH NAME
sc_file \- OpenSC file struct
.SH SYNOPSIS
.nf
.B #include <opensc.h>
.sp
.B "typedef struct sc_file {
.B " struct sc_path path;
.B " int type, ef_structure;
.B " size_t size;
.B " int id;
.B "
.B " /* record structured files only */
.B " int record_length;
.B " int record_count;
.B "} sc_file_t;
.fi
.SH DESCRIPTION
This structure describes a file object on a smart card.
It contains the following members:
.TP
.B path
This is the full path to the file, starting at the MF.
.TP
.B type
This is the file type. If can be one of
.BR SC_FILE_TYPE_DF ,
.BR SC_FILE_TYPE_WORKING_EF ", or
.BR SC_FILE_TYPE_INTERNAL_EF .
The latter is used by some cards only, and you normally shouldn't
have to deal with these files.
.TP
.B ef_structure
For elementary files (EFs), this field describes the file's
structure. It can be one of
.IP
.nf
.BR SC_FILE_EF_TRANSPARENT
.BR SC_FILE_EF_LINEAR_FIXED
.BR SC_FILE_EF_LINEAR_FIXED_TLV
.BR SC_FILE_EF_LINEAR_VARIABLE
.BR SC_FILE_EF_LINEAR_VARIABLE_TLV
.BR SC_FILE_EF_CYCLIC
.BR SC_FILE_EF_CYCLIC_TLV
.BR SC_FILE_EF_UNKNOWN
.fi
.TP
.B size
gives the file's size in bytes.
.TP
.B id
gives the file's ID, as a 16bit number.
.TP
.BR record_count ", " record_length
For record structured files, \fBrecord_count\fP specifies the
number of records in the file. For files with fixed length
records, \fBrecord_length\fP contains the record length.
.SH SEE ALSO
.BR sc_path (3),
.BR sc_file_new (3),
.BR sc_file_free (3),
.BR sc_select_file (3).
.SH AUTHOR
This manual page was written by Olaf Kirch <okir@suse.de>