The File.peek() function reads a byte from the file without removing it from buffer. Therefore, successive calls to peek() will return the same value. The File.peek() function inherits from the Stream utility class.
The File.peek() function inherits from the Stream utility class.
- file: an instance of the File class that is returned by SD.open()
- The next byte (or character), or -1 if none is available.