The application provides a
smart card file storage structure, which can improve the writing efficiency of large-size files on the basis of realizing the power-off protection function of
smart card file data, thereby improving the production efficiency of smart cards, and can also realize
wear leveling in the overall
storage area range. The file data is updated by alternately updating the
directory information block; the file is created and updated by randomly selecting available sectors to write the file and then registering the sector number of the written file in the
directory information block, and only one or two writing operations are required to realize the creation and update of the file; when a long file is created, only the file item FILE_ITM of the long file needs to be constructed in the
directory information block, and the actual storage space of the long file does not need to be allocated in the file data area, and the available sectors are applied for the long file in the subsequent update operation. Meanwhile, the application also discloses a
smart card file management method.