A static method, so no reader is needed. Only the extension is examined, without regard to case: .raw, .mzML, .mzXML and .mgf are recognized. The file does not have to exist.
Syntax
| Syntax | Description |
|---|
| static CheckFileFormat(string fileName) | Reads a file name string and returns the FileFormat value based on the file extension characters. |
Parameters
| Name | Type | Description |
|---|
| fileName | string | The file name; only its extension is examined. |
Returns
| Type | Description |
|---|
| FileFormat | The format matching the extension. |
Exceptions
| Exception | Condition |
|---|
| FormatException | The file doesn’t have an extension or the extension isn’t recognized. |
Example
1
2
3
| using Nova.Io.Read;
FileFormat format = FileReader.CheckFileFormat("DDA.RAW"); // FileFormat.ThermoRaw
|