SD卡#
加载文件()#
The loadfile(filename, buffer, len)
method loads the named file.
参数 |
描述 |
---|---|
文件名 |
要读取的文件的名称。 |
缓冲 |
指向内存中存储文件数据的位置的指针。 |
len |
缓冲区的长度(以字节为单位)。 |
**返回:**一个表示缓冲区长度(以字节为单位)的整数。
插入()#
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.
尺寸()#
The size(filename)
method returns the size in bytes of the named file.
参数 |
描述 |
---|---|
文件名 |
要检查的文件的名称。 |
**返回:**一个表示文件大小(以字节为单位)的整数。
保存文件()#
The savefile(filename, buffer, len)
method saves a bytearray into a named file.
参数 |
描述 |
---|---|
文件名 |
要写入的文件的名称。 |
缓冲 |
指向内存中存储文件数据的位置的指针。 |
len |
缓冲区的长度(以字节为单位)。 |
**返回:**一个表示缓冲区长度(以字节为单位)的整数。
追加文件()#
The appendfile(filename, buffer, len)
method appends data into a named file.
参数 |
描述 |
---|---|
文件名 |
要写入的文件的名称。 |
缓冲 |
指向内存中存储文件数据的位置的指针。 |
len |
缓冲区的长度(以字节为单位)。 |
**返回:**一个表示缓冲区长度(以字节为单位)的整数。
存在()#
The exists(filename)
method returns if the named file exists on the sd card.
参数 |
描述 |
---|---|
文件名 |
要检查的文件的名称。 |
Returns: true
if file exists. false
if it does not exist.