Main Content

isSourceValid

Class: Simulink.data.adapters.BaseMatlabFileAdapter
Namespace: Simulink.data.adapters

Validates external file

Since R2022b

Syntax

tf = isSourceValid(adapterObj,sourceFile)

Description

tf = isSourceValid(adapterObj,sourceFile) validates the external source file. The default implementation validates that the source file exists.

Custom file adapters must define behavior for the getAdapterName, getSupportedExtensions, and getData methods. In addition, you can choose to override the isSourceValid, supportsReading, getSectionNames, getCurrentChecksum, open, and close methods.

Input Arguments

expand all

Custom file adapter, specified as an object of a class that derives from the Simulink.data.adapters.BaseMatlabFileAdapter base class.

Example: myCustomFileAdapter

External source file, specified as a character array or string.

Output Arguments

expand all

True or false result, returned as a 1 or 0 of data type logical or an array of logical values.

Version History

Introduced in R2022b