Main Content



Validates external file

Since R2022b


tf = isSourceValid(adapterObj,sourceFile)


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 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