Skip to content

Commit b59944c

Browse files
committed
Adds I2cDev::Info::exists()
1 parent 03a90c1 commit b59944c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/piduino/i2cdev.h

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <deque>
2222
#include <string>
23+
#include <piduino/system.h>
2324
#include <piduino/iodevice.h>
2425

2526
/**
@@ -51,6 +52,9 @@ namespace Piduino {
5152
return _path;
5253
}
5354
bool setPath (const std::string & path);
55+
inline bool exists() const {
56+
return System::charFileExists(_path);
57+
}
5458
bool operator== (const Info & other) {
5559
return (_path == other._path) ;
5660
}

0 commit comments

Comments
 (0)