bool CMemoryUnitManager::IsDriveWriteable(const CStdString &path) const
{
  CURL url(path);
  IDevice *device = GetDevice(url.GetProtocol()[3] - '0');
  if (device && strcmpi(device->GetFileSystem(), "fatx") == 0)
    return true;
  return false;
}
IFileSystem *CMemoryUnitManager::GetFileSystem(unsigned char unit)
{
  IDevice *device = GetDevice(unit);
  if (!device)
    return NULL;
  if (strcmpi(device->GetFileSystem(), "fatx") == 0)
    return new CFatXFileSystem(unit);
  return new CFat32FileSystem(unit);
}
bool CMemoryUnitManager::IsDriveValid(char Drive)
{
  for (unsigned int i = 0; i < m_memUnits.size(); i++)
  {
    IDevice *device = m_memUnits[i];
    if (strcmpi(device->GetFileSystem(), "fatx") == 0)
    {
      if (((CFatXDevice *)device)->GetDrive() == Drive)
        return true;
    }
  }
  return false;
}