Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » system facilities » searchPath(List,String)
next | previous | forward | backward | up | index | toc

# searchPath(List,String) -- search a path for a file

- Function: searchPath
- Usage:
    `searchPath(pa,fn)`
    `searchPath fn`
- Inputs:
  - pa, a list, a list of strings giving paths to directories. Each one ends with a slash. If omitted, then path is used
  - fn, a string
- Outputs:
  - a list, a list of those directories in pa containing files named fn

## See also

- File -- the class of all files
- minimizeFilename -- minimize a file name
- relativizeFilename -- relativize a file name
- baseFilename -- the base part of a filename or path
- toAbsolutePath -- the absolute path version of a file name
- path -- list of directories to look in

## Ways to use this method:

- searchPath(List,String) -- search a path for a file
- `searchPath(String)`

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_system.m2:1370:0.