SDcard#
loadfile()#
The loadfile(filename, buffer, len) method loads the named file.
Parameters |
Description |
|---|---|
|
The name of the file to read. |
|
A pointer to a place in memory where file data will be stored. |
|
The length of the buffer in bytes. |
Returns: An integer representing the length of the buffer in bytes.
isInserted()#
The isInserted() method returns the status of the SD Card.
Returns: true if an SD card is inserted into the brain. false if it is not.
size()#
The size(filename) method returns the size in bytes of the named file.
Parameters |
Description |
|---|---|
|
The name of the file to check. |
Returns: An integer representing the size of file in bytes.
savefile()#
The savefile(filename, buffer, len) method saves a bytearray into a named file.
Parameters |
Description |
|---|---|
|
The name of the file to write. |
|
A pointer to a place in memory where file data will be stored. |
|
The length of the buffer in bytes. |
Returns: An integer representing the length of the buffer in bytes.
appendfile()#
The appendfile(filename, buffer, len) method appends data into a named file.
Parameters |
Description |
|---|---|
|
The name of the file to write. |
|
A pointer to a place in memory where file data will be stored. |
|
The length of the buffer in bytes. |
Returns: An integer representing the length of the buffer in bytes.
exists()#
The exists(filename) method returns if the named file exists on the sd card.
Parameters |
Description |
|---|---|
|
The name of the file to check. |
Returns: true if file exists. false if it does not exist.