示例#1
0
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;
}
示例#2
0
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);
}
示例#3
0
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;
}