SD library read() and peek() are not defined any where!

They are pure virtual functions in the base class:

class Stream : public Print
{
  protected:
    unsigned long _timeout;      // number of milliseconds to wait for the next char before aborting timed read
    unsigned long _startMillis;  // used for timeout measurement
    int timedRead();    // private method to read stream with timeout
    int timedPeek();    // private method to peek stream with timeout
    int peekNextDigit(LookaheadMode lookahead, bool detectDecimal); // returns the next numeric digit in the stream or -1 if timeout

  public:
    virtual void begin(unsigned long baud) = 0;
    virtual int available() = 0;
    [b]virtual int read() = 0;[/b]
	virtual size_t write(uint8_t) = 0;
    [b]virtual int peek() = 0;[/b]
    virtual void flush() = 0;

They are defined in the SD library's File class.

But there is no implementation in SD.ccp that I can find.
The author of this library MUST have defined them some where because I am not getting an unresolved symbol compile error.

So where the devil are they defined??????

class File : public Stream {
 private:
  char _name[13]; // our name
  SdFile *_file;  // underlying file pointer

public:
  File(SdFile f, const char *name);     // wraps an underlying SdFile
  File(void);      // 'empty' constructor
  ~File(void);     // destructor
#if ARDUINO >= 100
  virtual size_t write(uint8_t);
  virtual size_t write(const uint8_t *buf, size_t size);
#else
  virtual void write(uint8_t);
  virtual void write(const uint8_t *buf, size_t size);
#endif
  String readLine();
  virtual int read();
  virtual int peek();

Perhaps I'm not understanding the question correctly, but if you look here, you will see that the SD class inherits from the File class. Looking in file.cpp, you can see the read() and peek() methods.

econjack:
Perhaps I'm not understanding the question correctly, but if you look here, you will see that the SD class inherits from the File class. Looking in file.cpp, you can see the read() and peek() methods.

I know what that doco says but, regardless of that, the functions are simply NOT defined in SD.cpp

A search on "read" (whole word + case sensitive) fails to locate these function definitions!

boylesg:
I know what that doco says but, regardless of that, the functions are simply NOT defined in SD.cpp

A search on "read" (whole word + case sensitive) fails to locate these function definitions!

Never mind!

The author has defined the File class in SD.h but, confusingly, implemented the functions in File.cpp

Didn't even notice that file - wasn't looking for it.

That's generally how inheritance works. File.h is called the parent class, and the SD.h is the child class and it can take all the functions from File.h. There are obviously other nuances to it, but that is general overview.

michaelsm:
That's generally how inheritance works. File.h is called the parent class, and the SD.h is the child class and it can take all the functions from File.h. There are obviously other nuances to it, but that is general overview.

There is no File.h in the SD library!

SD.h, SD.cpp and File.cpp

But the C++ convention is that you define a class in XYZ.h and implement the functions in XYX.cpp or XYX.c.......not in completely different files!