Integration class for the SdFat library.
More...
#include <SdFat.h>
List of all members.
Detailed Description
Integration class for the SdFat library.
Member Function Documentation
- Returns:
- a pointer to the Sd2Card object.
bool SdFat::chdir |
( |
const char * |
path ) |
|
Change current working directory
Changes the current working directory to the path subdirectory.
Example: Executing chdir("SUB") in the "/DIR" directory will change the current working directory from "/DIR" to "/DIR/SUB".
- Parameters:
-
[in] | path | The name of the subdirectory. |
- Returns:
- The value one, true, is returned for success and the value zero, false, is returned for failure.
Change current working directory to root
Changes the current working directory to the SD's root directory.
- Returns:
- The value one, true, is returned for success and the value zero, false, is returned for failure.
SdFile* SdFat::cwd |
( |
) |
[inline] |
- Returns:
- a pointer to the current working directory.
void SdFat::errorHalt |
( |
) |
|
Print any SD error code and halt.
void SdFat::errorHalt |
( |
char const * |
msg ) |
|
Print msg, any SD error code, and halt.
- Parameters:
-
void SdFat::errorHalt_P |
( |
PGM_P |
msg ) |
|
Print msg, any SD error code, and halt.
- Parameters:
-
[in] | msg | Message in program space (flash memory) to print. |
void SdFat::errorPrint |
( |
) |
|
void SdFat::errorPrint |
( |
char const * |
msg ) |
|
Print msg, any SD error code.
- Parameters:
-
void SdFat::errorPrint_P |
( |
PGM_P |
msg ) |
|
Print msg, any SD error code.
- Parameters:
-
[in] | msg | Message in program space (flash memory) to print. |
bool SdFat::exists |
( |
const char * |
name ) |
|
Test for the existence of a file.
- Parameters:
-
[in] | name | Name of the file to be tested for. |
- Returns:
- true if the file exists else false.
Initialize an SdFat object.
Initializes the SD card, SD volume, and root directory.
- Parameters:
-
- Returns:
- The value one, true, is returned for success and the value zero, false, is returned for failure.
void SdFat::initErrorHalt |
( |
) |
|
void SdFat::initErrorPrint |
( |
) |
|
void SdFat::ls |
( |
uint8_t |
flags = 0 , |
|
|
uint8_t |
indent = 0 |
|
) |
| |
List the directory contents of the current working directory to Serial.
- Parameters:
-
[in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
- Parameters:
-
[in] | indent | Amount of space before file name. Used for recursive list to indicate subdirectory level. |
bool SdFat::mkdir |
( |
const char * |
path, |
|
|
bool |
pFlag = true |
|
) |
| |
Make a subdirectory in the current working 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 one, true, is returned for success and the value zero, false, is returned for failure.
bool SdFat::remove |
( |
const char * |
path ) |
|
Remove a file from the current working directory.
- Parameters:
-
[in] | path | A path with a valid 8.3 DOS name for the file. |
- Returns:
- The value one, true, is returned for success and the value zero, false, is returned for failure.
bool SdFat::rmdir |
( |
const char * |
path ) |
|
Remove a subdirectory from the current 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 one, true, is returned for success and the value zero, false, is returned for failure.
- Returns:
- a pointer to the SdVolume object.
The documentation for this class was generated from the following files:
- Arduino/libraries/SdFat/SdFat.h
- Arduino/libraries/SdFat/SdFat.cpp