The following interface definition is provided as a standard that can followed when developing a smart card service provider.
The ISCardFileAccess interface can be used to implement a high-level interface to a card-based file system with an underlying card file system based on the structure defined in ISO/IEC 7816-4. Other implementations are possible, but this is expected to be the most common.
The ISCardFileAccess interface can be used to expose file system entities in a manner very familiar to application developers in the PC environment. It provides mechanisms for locating specific files and performing common operations such as selecting, reading, writing, creating and deleting. It encapsulates and masks much of the low-level detail involved in performing these operations at the card level.
Following is a typical use of the ISCardFileAccess interface. In this case, the ISCardFileAccess interface is used to select, open and, write to a file.
ISCardFileAccess Methods | Description |
---|---|
ChangeDir | Changes the current smart card directory to the new specified directory. |
Close | Closes the specified file. |
Create | Creates a file at a given location within the ICC file system. |
GetCurrentDir | Returns an absolute path to the currently selected directory. |
GetProperties | Retrieves the primitive data referred by tags (TLV) for the specified object. |
Invalidate | Invalidates the specified file. |
Open | Opens the specified file for further use. |
Read | Reads and returns the specified data from a given file. |
Rehabilitate | Makes a file (EF or DF), which has been previously invalidated with the Invalidate command, accessible by the application. |
Seek | Selects the object from which read/write access will be done. |
SetProperties | Sets the primitive data referred by tags (TLV) for the specified object. |
Write | Writes data to a current opened file. |