public virtual bool hasFile(string filePath) { try { UmdIsoFile umdIsoFile = getFile(filePath); if (umdIsoFile != null) { umdIsoFile.Dispose(); return(true); } } catch (FileNotFoundException) { } catch (IOException) { } return(false); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: private bool hasIsoHeader() throws java.io.IOException private bool hasIsoHeader() { if (numSectors <= 0) { return(false); } UmdIsoFile f = new UmdIsoFile(this, startSector, sectorLength, null, null); sbyte[] header = new sbyte[6]; int Length = f.read(header); f.Dispose(); if (Length < header.Length) { return(false); } if (header[1] != (sbyte)'C' || header[2] != (sbyte)'D' || header[3] != (sbyte)'0' || header[4] != (sbyte)'0' || header[5] != (sbyte)'1') { return(false); } hasJolietExtension_Renamed = false; f = new UmdIsoFile(this, startSectorJoliet, sectorLength, null, null); Length = f.read(header); f.Dispose(); if (Length == header.Length) { if (header[0] == 2 && header[1] == (sbyte)'C' && header[2] == (sbyte)'D' && header[3] == (sbyte)'0' && header[4] == (sbyte)'0' && header[5] == (sbyte)'1') { hasJolietExtension_Renamed = true; } } return(true); }