Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Volume Management
[FILE - Class for file management]


Functions

bool otFILE.format (const char *diskLabel="", int fmt=F_FAT32, U32 sectorSize=0)
bool otFILE.mount (bool on)
bool otFILE.setLabel (const char *diskLabel)
bool otFILE.getLabel (char *diskLabel)
U32 otFILE.free ()
bool otFILE.isActive ()

Function Documentation

bool otFILE.format (  const char *  diskLabel = "",
int  fmt = F_FAT32,
U32  sectorSize = 0
)  [inherited]
 

Function creates an FAT/exFAT volume on the logical drive.

Parameters:
diskLabel Name of the volume
fmt Specifies combination of FAT type flags, F_FAT, F_FAT32, F_EXFAT and bitwise-or of these three, F_ANY. F_EXFAT is ignored when exFAT is not enabled.
sectorSize Specifies size of the allocation unit (cluter) in unit of byte. Leave 0 for automatic.
Returns:
True on success

U32 otFILE.free (   )  [inherited]
 

Function gets number of the free clusters on the volume.

Returns:
Available disk space as Kbytes.

bool otFILE.getLabel (  char *  diskLabel  )  [inherited]
 

Function returns volume label and volume serial number of a volume.

Parameters:
diskLabel Pointer to the buffer to store the volume label. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed. The buffer size must be at least of 34 bytes to avoid buffer overflow.
Returns:
True on success

bool otFILE.isActive (   )  [inherited]
 

Check if SD is on and is mounted.

Returns:
True if SD is on and mounted.

bool otFILE.mount (  bool  on  )  [inherited]
 

Mount or un mount a logical drive on SD.

Parameters:
on If true mount a logical drive.
Returns:
True on success

bool otFILE.setLabel (  const char *  diskLabel  )  [inherited]
 

Function sets/removes the label of a volume.

Parameters:
diskLabel Pointer to the null-terminated string that specifies the volume label to be set.
Returns:
True on success
footer

otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0