genpath
Creates a path with the directory and sub-directories under dir.
Syntax
R = genpath(dir)
R = genpath(dir, exclude, ...)
Inputs
- dir
- Base directory for constructing the output path, R.
- exclude (optional)
- Name(s) of subdirectory to exclude in the output path, R.
Outputs
- R
- Construtcted path containing the base directory, dir, and all the subdirectories under it. Directories are separated by ';' on Windows and ':' on Linux operating systems, respectively.
Examples
R = genpath('c:\test')
R = c:\test;c:\test;c:\test\dir1\dir2;c:\test\dir2;c:\test\dir3;c\test\dir4
R = genpath('c:\test', 'dir2', 'c:\test\dir3')
R = c:\test;c:\test\dir1;c\test\dir4