1SC_FILE_T(3) OpenSC API reference SC_FILE_T(3)
2
3
4
6 sc_file_t - OpenSC file structure
7
9 #include <opensc.h>
10
11 typedef struct sc_file {
12 struct sc_path path;
13 int type, ef_structure;
14 size_t size;
15 int id;
16
17 /* record structured files only */
18 int record_length;
19 int record_count;
20 } sc_file_t;
21
22
23
25 This structure describes a file object on a smart card. It contains the
26 following members:
27
28 path
29 This is full the path to the file, starting at the MF.
30
31 type
32 This is the file type. It can be one of SC_FILE_TYPE_DF,
33 SC_FILE_TYPE_WORKING_EF, or SC_FILE_TYPE_INTERNAL_EF. The latter is
34 used by some cards only, and you normally shouldn't have to deal
35 with these files.
36
37 ef_structure
38 For elementary files (EFs), this field describes the file's
39 structure. It can be one of:
40
41 SC_FILE_EF_TRANSPARENT
42
43 SC_FILE_EF_LINEAR_FIXED
44
45 SC_FILE_EF_LINEAR_FIXED_TLV
46
47 SC_FILE_EF_LINEAR_VARIABLE
48
49 SC_FILE_EF_LINEAR_VARIABLE_TLV
50
51 SC_FILE_EF_CYCLIC
52
53 SC_FILE_EF_CYCLIC_TLV
54
55 SC_FILE_EF_UNKNOWN
56
57 size
58 gives the file's size in bytes.
59
60 id
61 gives the file's ID, as a 16-bit number.
62
63 record_count, record_length
64 For record structured files, record_sount specifies the number of
65 records in the file. For files with fixed length records,
66 record_length contains the record length.
67
68
69
70opensc 05/04/2007 SC_FILE_T(3)