IOFileConversion.TryConvert Method
Definition
Attempts to convert a file to the specified target format, returning false if the conversion fails.
public static bool TryConvert(IOFile source, IOFileFormat targetFormat, out IOFile? result, out string? error);
Parameters
| Name | Type | Description |
|---|---|---|
| source | IOFile | The source file to convert. |
| targetFormat | IOFileFormat | The target format to convert to. |
| result | IOFile | The converted file, or null if conversion failed. |
| error | String | The error message if conversion failed, or null if successful. |
Returns
true if the conversion succeeded; false otherwise.