Need help porting IniFile library to work with SdFat

I need this:

To work with this:
https://code.google.com/p/sdfatlib/

As written, IniFile works with the native Arduino SD library. I took a stab at converting it over, but I got stuck with about half of the errors. Can anyone help out a noob? I can offer you great amounts of praise and virtual high fiving in return.

Since SD is just a wrapper for an old version of SdFat, most programs can be converted.

I attached a version that at least runs the example with the same result. You must be logged in to see IniFileSdFat.zip.

Here is the diff of the conversion which took about 15 minutes.

diff -r IniFileSD/IniFile.cpp IniFileSdFat/IniFile.cpp
45c45
<   if (!_file) {
---
>   if (!_file.isOpen()) {
292,293c292,293
< //int8_t IniFile::readLine(File &file, char *buffer, size_t len, uint32_t &pos)
< IniFile::error_t IniFile::readLine(File &file, char *buffer, size_t len, uint32_t &pos)
---
> //int8_t IniFile::readLine(SdBaseFile &file, char *buffer, size_t len, uint32_t &pos)
> IniFile::error_t IniFile::readLine(SdBaseFile &file, char *buffer, size_t len, uint32_t &pos)
295c295
<   if (!file)
---
>   if (!file.isOpen())
301c301
<   if (!file.seek(pos))
---
>   if (!file.seekSet(pos))
diff -r IniFileSD/IniFile.h IniFileSdFat/IniFile.h
8c8
< #include "SD.h"
---
> #include "SdFat.h"
30c30
<   IniFile(const char* filename, uint8_t mode = FILE_READ,
---
>   IniFile(const char* filename, uint8_t mode = O_READ,
96,97c96,97
<   //static int8_t readLine(File &file, char *buffer, size_t len, uint32_t &pos);
<   static error_t readLine(File &file, char *buffer, size_t len, uint32_t &pos);
---
>   //static int8_t readLine(SdBaseFile &file, char *buffer, size_t len, uint32_t &pos);
>   static error_t readLine(SdBaseFile &file, char *buffer, size_t len, uint32_t &pos);
117c117
<   mutable File _file;
---
>   mutable SdBaseFile _file;
123c123
<   if (_file)
---
>   if (_file.isOpen())
125c125
<   _file = SD.open(_filename, _mode);
---
>   _file.open(_filename, _mode);
138c138
<   if (_file)
---
>   if (_file.isOpen())
144c144
<   return (_file == true);
---
>   return _file.isOpen();
diff -r IniFileSD/examples/IniFileExample/IniFileExample.ino IniFileSdFat/examples/IniFileExample/IniFileExample.ino
1c1
< #include <SD.h>
---
> #include <SdFat.h>
3c3
< 
---
> SdFat sd;
68c68
<   if (!SD.begin(SD_SELECT))
---
>   if (!sd.begin(SD_SELECT))
144c144
< }
---
> }

IniFileSdFat.zip (13.7 KB)

You are one of the great ones, fat16lib. Thank you so much!!!

The original library had a bug that would fall into an infinite loop if you searched for a non-existing "section" in an INI file. I've attached a fixed version of the SdFat port.

IniFileSdFat.zip (13.7 KB)