mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Added File.isDirectory()
This commit is contained in:
parent
f149dac5a7
commit
eaffb912f6
@ -150,6 +150,17 @@ const char *File::name() {
|
|||||||
return filename.c_str();
|
return filename.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
boolean File::isDirectory() {
|
||||||
|
uint8_t res[1];
|
||||||
|
uint8_t lenght;
|
||||||
|
uint8_t cmd[] = {'i'};
|
||||||
|
if (mode != 255)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
bridge.transfer(cmd, 1, (uint8_t *)filename.c_str(), filename.length(), res, 1);
|
||||||
|
return res[0];
|
||||||
|
}
|
||||||
//boolean isDirectory(void)
|
//boolean isDirectory(void)
|
||||||
//File openNextFile(uint8_t mode = O_RDONLY);
|
//File openNextFile(uint8_t mode = O_RDONLY);
|
||||||
//void rewindDirectory(void)
|
//void rewindDirectory(void)
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
void close();
|
void close();
|
||||||
operator bool();
|
operator bool();
|
||||||
const char * name();
|
const char * name();
|
||||||
|
boolean isDirectory();
|
||||||
boolean iFileSystemirectory(void);
|
boolean iFileSystemirectory(void);
|
||||||
File openNextFile(uint8_t mode = FILE_READ);
|
File openNextFile(uint8_t mode = FILE_READ);
|
||||||
void rewindDirectory(void);
|
void rewindDirectory(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user