fsMediaWriteProtected (Function) |
Top Previous Next |
This queries if a media is write protected. If the media is write protected, it is not possible to write any information to it (read-only mode), and it is not possible to create, modify, or delete any files or directories.
The write protection on an SD-CARD is determined by the small "tab" on the edge of the card. This "tab" is only present on the full-size SD-CARD - therefore devices with a micro-SD-CARD reader will never report the media as write protected.
USB medias can be write protected for multiple reasons, including by setting physical write protection switches or, especially in the case of flash medias, in the case of errors on the file system.
Input: media : INT (0..3) The media to query.
Returns: BOOL
Declaration: FUNCTION fsMediaWriteProtected : BOOL;
Example: INCLUDE rtcu.inc |