Main Content

Simulink.io.FileType.isFileSupported

Class: Simulink.io.FileType
Package: Simulink.io

Check if file type is supported in Simulink

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
Introduced in R2020a