matlab.project.isFileInProject
Syntax
Description
returns tf = matlab.project.isFileInProject(fileOrFolder)1 (true) if the specified file or folder
specified by fileOrFolder belongs to a project folder and
0 (false) otherwise. If
fileOrFolder is a project root folder,
matlab.project.isFileInProject returns 0
(false).
For large projects, checking whether a file is a project file can be a slow operation.
For large projects, use the matlab.project.isUnderProjectRoot function to quickly check whether a file is
under a project root.
[
also returns the location of the project the function finds. If
tf,projectRoot] = matlab.project.isFileInProject(fileOrFolder)fileOrFolder does not belong to a project, then
projectRoot is an empty string.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2023b