mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Adding position() function to File class and replacing FILE_TRUNCATE and FILE_APPEND with FILE_WRITE (SD library). Updating examples and keywords.txt accordingly.
This commit is contained in:
@ -297,6 +297,9 @@ boolean callback_openPath(SdFile& parentDir, char *filePathComponent,
|
||||
if (isLastComponent) {
|
||||
SDClass *p_SD = static_cast<SDClass*>(object);
|
||||
p_SD->file.open(parentDir, filePathComponent, p_SD->fileOpenMode);
|
||||
if (p_SD->fileOpenMode == FILE_WRITE) {
|
||||
p_SD->file.seekSet(p_SD->file.fileSize());
|
||||
}
|
||||
p_SD->c = -1;
|
||||
// TODO: Return file open result?
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user