matlab.project.isUnderProjectRoot
Syntax
Description
tf = matlab.project.isUnderProjectRoot(
returns fileOrFolder
)1
(true
) if the input file or folder is under
a project root folder, and 0
(false
) otherwise.
matlab.project.isUnderProjectRoot
returns 0 (false) if
fileOrFolder
is itself a project root folder.
For large projects, checking whether a file is a project file can be a slow operation.
Use matlab.project.isUnderProjectRoot
to perform a quick check if a file
is under a project root.
[tf,
returns the location of the first project root it finds. If the input file or folder is not
under a project root, projectRoot
] = matlab.project.isUnderProjectRoot(fileOrFolder
)projectRoot
returns an empty string.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2023a