Main Content

Simulink.io.FileType.isFileSupported

Class: Simulink.io.FileType
Namespace: Simulink.io

Check if file type is supported in Simulink

Since R2020a

Syntax

isSupported = isFileSupported(fullFile)

Description

isSupported = isFileSupported(fullFile) checks if the file located at fullFile is supported in Simulink®.

Input Arguments

expand all

Fully qualified file name, specified as a character array.

Example: C:\mydir\mySignals.csv

Data Types: char

Output Arguments

expand all

File support indicator, returned as true (1) or false (0).

Examples

expand all

Subclass FileType class and implement the isFileSupported method.

classdef MySignalMatFile < Simulink.io.FileType

Implement the static method isFileSupported.

methods ( Static )
                
        function isSupported = isFileSupported( fileLocation )
            
            isSupported = false;
            
            if exist( fileLocation, 'file' )
                isSupported = true;
            end
            
        end
    end

Version History

Introduced in R2020a