SdFat
|
SdFat class using SDIO. More...
#include <SdFat.h>
Public Member Functions | |
bool | begin (BlockDriver *blockDev, uint8_t part=0) |
bool | begin () |
uint8_t | blocksPerCluster () const |
uint32_t | blocksPerFat () const |
cache_t * | cacheClear () |
SdioCard * | card () |
bool | cardBegin () |
uint8_t | cardErrorCode () |
uint32_t | cardErrorData () |
bool | chdir (bool set_cwd=false) |
bool | chdir (const char *path, bool set_cwd=false) |
void | chvol () |
uint32_t | clusterCount () const |
uint8_t | clusterSizeShift () const |
uint32_t | dataStartBlock () const |
int8_t | dbgFat (uint32_t n, uint32_t *v) |
void | errorHalt () |
void | errorHalt (Print *pr) |
void | errorHalt (char const *msg) |
void | errorHalt (Print *pr, char const *msg) |
void | errorHalt (const __FlashStringHelper *msg) |
void | errorHalt (Print *pr, const __FlashStringHelper *msg) |
void | errorPrint () |
void | errorPrint (Print *pr) |
void | errorPrint (const char *msg) |
void | errorPrint (Print *pr, char const *msg) |
void | errorPrint (const __FlashStringHelper *msg) |
void | errorPrint (Print *pr, const __FlashStringHelper *msg) |
bool | exists (const char *path) |
uint8_t | fatCount () |
uint32_t | fatStartBlock () const |
uint8_t | fatType () const |
int32_t | freeClusterCount () |
bool | fsBegin () |
bool | init () |
bool | init (uint8_t part) |
void | initErrorHalt () |
void | initErrorHalt (Print *pr) |
void | initErrorHalt (char const *msg) |
void | initErrorHalt (Print *pr, char const *msg) |
void | initErrorHalt (const __FlashStringHelper *msg) |
void | initErrorHalt (Print *pr, const __FlashStringHelper *msg) |
void | initErrorPrint () |
void | initErrorPrint (Print *pr) |
void | initErrorPrint (char const *msg) |
void | initErrorPrint (Print *pr, char const *msg) |
void | initErrorPrint (const __FlashStringHelper *msg) |
void | initErrorPrint (Print *pr, const __FlashStringHelper *msg) |
void | ls (uint8_t flags=0) |
void | ls (const char *path, uint8_t flags=0) |
void | ls (print_t *pr, uint8_t flags=0) |
void | ls (print_t *pr, const char *path, uint8_t flags) |
bool | mkdir (const char *path, bool pFlag=true) |
File | open (const char *path, uint8_t mode=FILE_READ) |
File | open (const String &path, uint8_t mode=FILE_READ) |
bool | remove (const char *path) |
bool | rename (const char *oldPath, const char *newPath) |
bool | rmdir (const char *path) |
uint16_t | rootDirEntryCount () const |
uint32_t | rootDirStart () const |
bool | truncate (const char *path, uint32_t length) |
FatVolume * | vol () |
uint32_t | volumeBlockCount () const |
FatFile * | vwd () |
bool | wipe (print_t *pr=0) |
SdFat class using SDIO.
|
inlineinherited |
Initialize an FatFileSystem object.
[in] | blockDev | Device block driver. |
[in] | part | partition to initialize. |
|
inline |
Initialize SD card and file system.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Clear the cache and returns a pointer to the cache. Not for normal apps.
|
inlineinherited |
|
inline |
Initialize SD card for diagnostic use only.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Change a volume's working directory to root
Changes the volume's working directory to the SD's root directory. Optionally set the current working directory to the volume's working directory.
[in] | set_cwd | Set the current working directory to this volume's working directory if true. |
|
inlineinherited |
Change a volume's working directory
Changes the volume working directory to the path subdirectory. Optionally set the current working directory to the volume's working directory.
Example: If the volume's working directory is "/DIR", chdir("SUB") will change the volume's working directory from "/DIR" to "/DIR/SUB".
If path is "/", the volume's working directory will be changed to the root directory
[in] | path | The name of the subdirectory. |
[in] | set_cwd | Set the current working directory to this volume's working directory if true. |
|
inlineinherited |
Set the current working directory to a volume's working directory.
This is useful with multiple SD cards.
The current working directory is changed to this volume's working directory.
This is like the Windows/DOS <drive letter>: command.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Debug access to FAT table
[in] | n | cluster number. |
[out] | v | value of entry |
|
inlineinherited |
Print any SD error code to Serial and halt.
|
inlineinherited |
Print any SD error code and halt.
[in] | pr | Print destination. |
|
inlineinherited |
Print msg, any SD error code and halt.
[in] | msg | Message to print. |
|
inlineinherited |
Print msg, any SD error code, and halt.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
|
inlineinherited |
Print msg, any SD error code, and halt.
[in] | msg | Message to print. |
|
inlineinherited |
Print msg, any SD error code, and halt.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
|
inlineinherited |
Print any SD error code to Serial
|
inlineinherited |
Print any SD error code.
[in] | pr | Print device. |
|
inlineinherited |
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. |
|
inlineinherited |
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. |
|
inlineinherited |
Test for the existence of a file.
[in] | path | Path of the file to be tested for. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Volume free space in clusters.
|
inline |
Initialize file system for diagnostic use only.
|
inlineinherited |
Initialize a FAT volume. Try partition one first then try super floppy format.
|
inherited |
Initialize a FAT volume.
[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 block zero. |
|
inlineinherited |
Print any SD error code and halt.
|
inlineinherited |
Print error details and halt after begin fails.
[in] | pr | Print destination. |
|
inlineinherited |
Print message, error details, and halt after begin() fails.
[in] | msg | Message to print. |
|
inlineinherited |
Print message, error details, and halt after begin() fails.
[in] | pr | Print device. |
[in] | msg | Message to print. |
|
inlineinherited |
Print message, error details, and halt after begin() fails.
[in] | msg | Message to print. |
|
inlineinherited |
Print message, error details, and halt after begin() fails.
[in] | pr | Print device for message. |
[in] | msg | Message to print. |
|
inlineinherited |
Print error details after begin() fails.
|
inlineinherited |
Print error details after begin() fails.
[in] | pr | Print destination. |
|
inlineinherited |
Print message and error details and halt after begin() fails.
[in] | msg | Message to print. |
|
inlineinherited |
Print message and error details and halt after begin() fails.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
|
inlineinherited |
Print message and error details and halt after begin() fails.
[in] | msg | Message to print. |
|
inlineinherited |
Print message and error details and halt after begin() fails.
[in] | pr | Print destination. |
[in] | msg | Message to print. |
|
inlineinherited |
List the directory contents of the volume working 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 |
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 directory contents of the volume working 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 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 |
Make a subdirectory in the volume working directory.
[in] | path | A path with a valid 8.3 DOS name for the subdirectory. |
[in] | pFlag | Create missing parent directories if true. |
open a file
[in] | path | location of file to be opened. |
[in] | mode | open mode flags. |
open a file
[in] | path | location of file to be opened. |
[in] | mode | open mode flags. |
|
inlineinherited |
Remove a file from the volume working directory.
[in] | path | A path with a valid 8.3 DOS 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 |
Remove a subdirectory from the volume's working directory.
[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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.
[in] | path | A path with a valid 8.3 DOS name for the file. |
[in] | length | The desired length for the file. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Wipe all data from the volume. You must reinitialize the volume before accessing it again.
[in] | pr | print stream for status dots. |