SdFat
|
SD file system class for FAT volumes. More...
#include <SdFat.h>
Public Member Functions | |
bool | begin (BlockDevice *dev, bool setCwv=true, uint8_t part=1) |
bool | begin (SdCsPin_t csPin, uint32_t maxSck) |
bool | begin (SdCsPin_t csPin=SS) |
bool | begin (SdioConfig sdioConfig) |
bool | begin (SdSpiConfig spiConfig) |
uint16_t | bytesPerCluster () |
uint8_t | bytesPerClusterShift () |
uint16_t | bytesPerSector () |
uint8_t | bytesPerSectorShift () |
cache_t * | cacheClear () |
SdCard * | card () |
bool | cardBegin (SdioConfig sdioConfig) |
bool | cardBegin (SdSpiConfig spiConfig) |
bool | chdir () |
bool | chdir (const char *path) |
bool | chdir (const String &path) |
void | chvol () |
uint32_t | clusterCount () const |
uint32_t | dataStartSector () const |
int8_t | dbgFat (uint32_t n, uint32_t *v) |
void | errorHalt () |
void | errorHalt (const __FlashStringHelper *msg) |
void | errorHalt (const char *msg) |
void | errorHalt (print_t *pr) |
void | errorHalt (print_t *pr, const __FlashStringHelper *msg) |
void | errorHalt (print_t *pr, const char *msg) |
void | errorPrint (const __FlashStringHelper *msg) |
void | errorPrint (const char *msg) |
void | errorPrint (Print *pr, const __FlashStringHelper *msg) |
void | errorPrint (print_t *pr) |
void | errorPrint (print_t *pr, char const *msg) |
bool | exists (const char *path) |
bool | exists (const String &path) |
uint8_t | fatCount () |
uint32_t | fatStartSector () const |
uint8_t | fatType () const |
bool | format (print_t *pr=NULL) |
int32_t | freeClusterCount () |
bool | init (BlockDevice *dev, uint8_t part=1) |
void | initErrorHalt () |
void | initErrorHalt (const __FlashStringHelper *msg) |
void | initErrorHalt (const char *msg) |
void | initErrorHalt (Print *pr, const __FlashStringHelper *msg) |
void | initErrorHalt (print_t *pr) |
void | initErrorHalt (print_t *pr, const char *msg) |
void | initErrorPrint () |
void | initErrorPrint (Print *pr) |
bool | ls (const char *path, uint8_t flags=0) |
bool | ls (print_t *pr, const char *path, uint8_t flags) |
bool | ls (print_t *pr, uint8_t flags=0) |
bool | ls (uint8_t flags=0) |
bool | mkdir (const char *path, bool pFlag=true) |
bool | mkdir (const String &path, bool pFlag=true) |
File32 | open (const char *path, oflag_t oflag=0X00) |
File32 | open (const String &path, oflag_t oflag=0X00) |
void | printFatType (print_t *pr) |
void | printSdError (print_t *pr) |
bool | remove (const char *path) |
bool | remove (const String &path) |
bool | rename (const char *oldPath, const char *newPath) |
bool | rename (const String &oldPath, const String &newPath) |
bool | rmdir (const char *path) |
bool | rmdir (const String &path) |
uint16_t | rootDirEntryCount () const |
uint32_t | rootDirStart () const |
uint8_t | sdErrorCode () |
uint8_t | sdErrorData () |
uint16_t | sectorMask () |
uint8_t | sectorsPerCluster () const |
uint8_t | sectorsPerClusterShift () const |
uint32_t | sectorsPerFat () const |
bool | truncate (const char *path, uint32_t length) |
bool | truncate (const String &path, uint32_t length) |
FatVolume * | vol () |
bool | volumeBegin () |
uint32_t | volumeSectorCount () const |
Static Public Member Functions | |
static FatVolume * | cwv () |
SD file system class for FAT volumes.
|
inlineinherited |
Initialize an FatVolume object.
[in] | dev | Device block driver. |
[in] | setCwv | Set current working volume if true. |
[in] | part | partition to initialize. |
Initialize SD card and file system.
[in] | csPin | SD card chip select pin. |
[in] | maxSck | Maximum SCK frequency. |
Initialize SD card and file system.
[in] | csPin | SD card chip select pin. |
|
inlineinherited |
Initialize SD card and file system for SDIO mode.
[in] | sdioConfig | SDIO configuration. |
|
inlineinherited |
Initialize SD card and file system for SPI mode.
[in] | spiConfig | SPI configuration. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Clear the cache and returns a pointer to the cache. Not for normal apps.
|
inlineinherited |
Initialize SD card in SDIO mode.
[in] | sdioConfig | SDIO configuration. |
|
inlineinherited |
Initialize SD card in SPI mode.
[in] | spiConfig | SPI configuration. |
|
inlineinherited |
Set volume working directory to root.
|
inherited |
Set volume working directory.
[in] | path | Path for volume working directory. |
|
inlineinherited |
Set volume working directory.
[in] | path | Path for volume working directory. |
|
inlineinherited |
Change global current working volume to this volume.
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
Debug access to FAT table
[in] | n | cluster number. |
[out] | v | value of entry |
Print msg to Serial and halt.
[in] | msg | Message to print. |
Print error info and halt.
[in] | msg | Message to print. |
Print error info and halt.
[in] | pr | Print destination. |
|
inlineinherited |
Print msg and halt.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
Print error info and halt.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
Print msg, any SD error code.
[in] | msg | Message to print. |
Print msg, any SD error code.
[in] | msg | Message to print. |
|
inlineinherited |
Print msg, any SD error code.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
Print SD errorCode and errorData.
[in] | pr | Print destination. |
Print msg, any SD error code.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
|
inlineinherited |
Test for the existence of a file.
[in] | path | Path of the file to be tested for. |
|
inlineinherited |
Test for the existence of a file.
[in] | path | Path of the file to be tested for. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Format a SD card FAT32/FAT16.
[in] | pr | Optional Print information. |
|
inherited |
Volume free space in clusters.
|
inherited |
Initialize a FAT partition.
[in] | dev | BlockDevice for this 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. |
Print error info and halt.
[in] | msg | Message to print. |
Print error info and halt.
[in] | msg | Message to print. |
|
inlineinherited |
Print error info and halt.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
Print error info and halt.
[in] | pr | Print destination. |
Print error info and halt.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
Print error details after begin() fails.
Print error details after begin() fails.
[in] | pr | Print destination. |
|
inlineinherited |
List the directory contents of a directory to Serial.
[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.
|
inlineinherited |
List the contents of a directory.
[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.
|
inlineinherited |
List the directory contents of the volume root directory.
[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.
|
inlineinherited |
List the directory contents of the root directory to Serial.
[in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
|
inlineinherited |
Make a subdirectory in the volume root directory.
[in] | path | A path with a valid name for the subdirectory. |
[in] | pFlag | Create missing parent directories if true. |
|
inlineinherited |
Make a subdirectory in the volume root directory.
[in] | path | A path with a valid name for the subdirectory. |
[in] | pFlag | Create missing parent directories if true. |
|
inlineinherited |
open a file
[in] | path | location of file to be opened. |
[in] | oflag | open flags. |
|
inlineinherited |
open a file
[in] | path | location of file to be opened. |
[in] | oflag | open flags. |
Print volume FAT/exFAT type.
[in] | pr | Print destination. |
Print error info and return.
[in] | pr | Print destination. |
|
inlineinherited |
Remove a file from the volume root directory.
[in] | path | A path with a valid name for the file. |
|
inlineinherited |
Remove a file from the volume root directory.
[in] | path | A path with a valid name for the file. |
|
inlineinherited |
Rename a file or subdirectory.
[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.
|
inlineinherited |
Rename a file or subdirectory.
[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.
|
inlineinherited |
Remove a subdirectory from the volume's working directory.
[in] | path | A path with a valid name for the subdirectory. |
The subdirectory file will be removed only if it is empty.
|
inlineinherited |
Remove a subdirectory from the volume's working directory.
[in] | path | A path with a valid name for the subdirectory. |
The subdirectory file will be removed only if it is empty.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Truncate a file to a specified length. The current file position will be at the new EOF.
[in] | path | A path with a valid name for the file. |
[in] | length | The desired length for the file. |
|
inlineinherited |
Truncate a file to a specified length. The current file position will be at the new EOF.
[in] | path | A path with a valid name for the file. |
[in] | length | The desired length for the file. |
Initialize file system after call to cardBegin.
|
inlineinherited |