SD file system class for exFAT volumes.
More...
#include <SdFs.h>
|
bool | begin (BlockDevice *dev, bool setCwv=true, uint8_t part=0) |
|
bool | begin (uint8_t csPin=SS) |
|
bool | begin (uint8_t csPin, SPISettings spiSettings) |
|
bool | begin (SdSpiConfig spiConfig) |
|
bool | begin (SdioConfig sdioConfig) |
|
uint32_t | bytesPerCluster () |
|
uint8_t | bytesPerClusterShift () |
|
uint16_t | bytesPerSector () |
|
uint8_t | bytesPerSectorShift () |
|
uint8_t * | cacheClear () |
|
SdCard * | card () |
|
bool | cardBegin (SdSpiConfig spiConfig) |
|
bool | cardBegin (SdioConfig sdioConfig) |
|
bool | chdir () |
|
bool | chdir (const char *path) |
|
void | chvol () |
|
uint32_t | clusterCount () |
|
uint32_t | clusterHeapStartSector () |
|
void | errorHalt (Print *pr) |
|
void | errorHalt () |
|
void | errorHalt (Print *pr, const char *msg) |
|
void | errorHalt (Print *pr, const __FlashStringHelper *msg) |
|
void | errorHalt (const __FlashStringHelper *msg) |
|
void | errorHalt (const char *msg) |
|
bool | exists (const ExChar_t *path) |
|
uint32_t | fatLength () |
|
uint32_t | fatStartSector () |
|
uint8_t | fatType () const |
|
bool | format (print_t *pr=nullptr) |
|
uint32_t | freeClusterCount () |
|
bool | init (BlockDevice *dev, uint8_t part) |
|
void | initErrorHalt (Print *pr) |
|
void | initErrorHalt () |
|
void | ls (print_t *pr, uint8_t flags=0) |
|
void | ls (print_t *pr, const ExChar_t *path, uint8_t flags) |
|
bool | mkdir (const ExChar_t *path, bool pFlag=true) |
|
void | printFatType (Print *pr) |
|
void | printSdError (print_t *pr) |
|
void | printSdErrorCode (Print *pr) |
|
bool | remove (const ExChar_t *path) |
|
bool | rename (const ExChar_t *oldPath, const ExChar_t *newPath) |
|
bool | rmdir (const ExChar_t *path) |
|
uint32_t | rootDirectoryCluster () |
|
uint32_t | rootLength () |
|
uint8_t | sdErrorCode () |
|
uint8_t | sdErrorData () |
|
uint32_t | sectorsPerCluster () |
|
uint8_t | sectorsPerClusterShift () |
|
bool | truncate (const ExChar_t *path, uint64_t length) |
|
bool | volumeBegin () |
|
SD file system class for exFAT volumes.
bool ExFatVolume::begin |
( |
BlockDevice * |
dev, |
|
|
bool |
setCwv = true , |
|
|
uint8_t |
part = 0 |
|
) |
| |
|
inlineinherited |
Initialize an FatVolume object.
- Parameters
-
[in] | dev | Device block driver. |
[in] | setCwv | Set current working volume if true. |
[in] | part | partition to initialize. |
- Returns
- The value true is returned for success and the value false is returned for failure.
Initialize SD card and file system.
- Parameters
-
[in] | csPin | SD card chip select pin. |
- Returns
- true for success else false.
Initialize SD card and file system.
- Parameters
-
[in] | csPin | SD card chip select pin. |
[in] | spiSettings | SPI speed, mode, and bit order. |
- Returns
- true for success else false.
Initialize SD card and file system for SPI mode.
- Parameters
-
[in] | spiConfig | SPI configuration. |
- Returns
- true for success else false.
Initialize SD card and file system for SDIO mode.
- Parameters
-
[in] | sdioConfig | SDIO configuration. |
- Returns
- true for success else false.
uint32_t ExFatPartition::bytesPerCluster |
( |
| ) |
|
|
inlineinherited |
- Returns
- the number of bytes in a cluster.
uint8_t ExFatPartition::bytesPerClusterShift |
( |
| ) |
|
|
inlineinherited |
- Returns
- the power of two for bytesPerCluster.
uint16_t ExFatPartition::bytesPerSector |
( |
| ) |
|
|
inlineinherited |
- Returns
- the number of bytes in a sector.
uint8_t ExFatPartition::bytesPerSectorShift |
( |
| ) |
|
|
inlineinherited |
- Returns
- the power of two for bytesPerSector.
uint8_t* ExFatPartition::cacheClear |
( |
| ) |
|
|
inlineinherited |
Clear the cache and returns a pointer to the cache. Not for normal apps.
- Returns
- A pointer to the cache buffer or zero if an error occurs.
- Returns
- Pointer to SD card object.
Initialize SD card in SPI mode.
- Parameters
-
[in] | spiConfig | SPI configuration. |
- Returns
- true for success else false.
Initialize SD card in SDIO mode.
- Parameters
-
[in] | sdioConfig | SDIO configuration. |
- Returns
- true for success else false.
bool ExFatVolume::chdir |
( |
| ) |
|
|
inlineinherited |
Set volume working directory to root.
- Returns
- true for success else false.
bool ExFatVolume::chdir |
( |
const char * |
path | ) |
|
|
inherited |
Set volume working directory.
- Parameters
-
[in] | path | Path for volume working directory. |
- Returns
- true for success or false for failure.
void ExFatVolume::chvol |
( |
| ) |
|
|
inlineinherited |
Change global working volume to this volume.
uint32_t ExFatPartition::clusterCount |
( |
| ) |
|
|
inlineinherited |
- Returns
- the cluster count for the partition.
uint32_t ExFatPartition::clusterHeapStartSector |
( |
| ) |
|
|
inlineinherited |
- Returns
- the cluster heap start sector.
- Returns
- current working volume.
Print error info and halt.
- Parameters
-
Print error info to Serial and halt.
Print error info and halt.
- Parameters
-
[in] | pr | Print destination. |
[in] | msg | Message to print. |
void SdBase< ExFatVolume >::errorHalt |
( |
Print * |
pr, |
|
|
const __FlashStringHelper * |
msg |
|
) |
| |
|
inlineinherited |
Print msg and halt.
- Parameters
-
[in] | pr | Print destination. |
[in] | msg | Message to print. |
Print msg to Serial and halt.
- Parameters
-
Print error info and halt.
- Parameters
-
bool ExFatVolume::exists |
( |
const ExChar_t * |
path | ) |
|
|
inlineinherited |
Test for the existence of a file.
- Parameters
-
[in] | path | Path of the file to be tested for. |
- Returns
- true if the file exists else false.
uint32_t ExFatPartition::fatLength |
( |
| ) |
|
|
inlineinherited |
- Returns
- the FAT length in sectors
uint32_t ExFatPartition::fatStartSector |
( |
| ) |
|
|
inlineinherited |
- Returns
- the FAT start sector number.
uint8_t ExFatPartition::fatType |
( |
| ) |
const |
|
inlineinherited |
- Returns
- Type FAT_TYPE_EXFAT for exFAT partition or zero for error.
bool SdExFat::format |
( |
print_t * |
pr = nullptr | ) |
|
|
inline |
Format a SD card exFAT.
- Parameters
-
[in] | pr | Optional Print information. |
- Returns
- true for success else false.
uint32_t ExFatPartition::freeClusterCount |
( |
| ) |
|
|
inherited |
- Returns
- the free cluster count.
bool ExFatPartition::init |
( |
BlockDevice * |
dev, |
|
|
uint8_t |
part |
|
) |
| |
|
inherited |
Initialize a exFAT partition.
- Parameters
-
[in] | dev | The blockDevice for the partition. |
[in] | part | The partition to be used. Legal values for part are 1-4 to use the corresponding partition on a device formatted with a MBR, Master Boot Record, or zero if the device is formatted as a super floppy with the FAT boot sector in sector zero. |
- Returns
- The value true is returned for success and the value false is returned for failure.
Print error info and halt.
- Parameters
-
Print error info and halt.
void ExFatVolume::ls |
( |
print_t * |
pr, |
|
|
uint8_t |
flags = 0 |
|
) |
| |
|
inlineinherited |
List the directory contents of the root directory.
- Parameters
-
[in] | pr | Print stream for list. |
[in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
void ExFatVolume::ls |
( |
print_t * |
pr, |
|
|
const ExChar_t * |
path, |
|
|
uint8_t |
flags |
|
) |
| |
|
inlineinherited |
List the directory contents of a directory.
- Parameters
-
[in] | pr | Print stream for list. |
[in] | path | directory to list. |
[in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
bool ExFatVolume::mkdir |
( |
const ExChar_t * |
path, |
|
|
bool |
pFlag = true |
|
) |
| |
|
inlineinherited |
Make a subdirectory in the volume root directory.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
[in] | pFlag | Create missing parent directories if true. |
- Returns
- The value true is returned for success and the value false is returned for failure.
Print volume FAT/exFAT type.
- Parameters
-
Print error info and return.
- Parameters
-
Print SD errorCode and errorData.
- Parameters
-
bool ExFatVolume::remove |
( |
const ExChar_t * |
path | ) |
|
|
inlineinherited |
Remove a file from the volume root directory.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the file. |
- Returns
- The value true is returned for success and the value false is returned for failure.
bool ExFatVolume::rename |
( |
const ExChar_t * |
oldPath, |
|
|
const ExChar_t * |
newPath |
|
) |
| |
|
inlineinherited |
Rename a file or subdirectory.
- Parameters
-
[in] | oldPath | Path name to the file or subdirectory to be renamed. |
[in] | newPath | New path name of the file or subdirectory. |
The newPath object must not exist before the rename call.
The file to be renamed must not be open. The directory entry may be moved and file system corruption could occur if the file is accessed by a file object that was opened before the rename() call.
- Returns
- The value true is returned for success and the value false is returned for failure.
bool ExFatVolume::rmdir |
( |
const ExChar_t * |
path | ) |
|
|
inlineinherited |
Remove a subdirectory from the volume's working directory.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
The subdirectory file will be removed only if it is empty.
- Returns
- The value true is returned for success and the value false is returned for failure.
uint32_t ExFatPartition::rootDirectoryCluster |
( |
| ) |
|
|
inlineinherited |
- Returns
- the root directory start cluster number.
uint32_t ExFatPartition::rootLength |
( |
| ) |
|
|
inherited |
- Returns
- the root directory length.
- Returns
- SD card error code.
- Returns
- SD card error data.
uint32_t ExFatPartition::sectorsPerCluster |
( |
| ) |
|
|
inlineinherited |
- Returns
- the number of sectors in a cluster.
uint8_t ExFatPartition::sectorsPerClusterShift |
( |
| ) |
|
|
inlineinherited |
- Returns
- the power of two for sectors per cluster.
bool ExFatVolume::truncate |
( |
const ExChar_t * |
path, |
|
|
uint64_t |
length |
|
) |
| |
|
inlineinherited |
Truncate a file to a specified length. The current file position will be at the new EOF.
- Parameters
-
[in] | path | A path with a valid 8.3 DOS name for the file. |
[in] | length | The desired length for the file. |
- Returns
- The value true is returned for success and the value false is returned for failure.
Initialize file system after call to cardBegin.
- Returns
- true for success else false.
The documentation for this class was generated from the following file:
- ArduinoSdFs/libraries/SdFs/src/SdFs.h