list
Lists all the paths under a specified directory or file path.
This method retrieves a list of paths that are either contained within a directory or represent the current path, depending on the type of the given path
.
Return
A list of paths under the given directory or file path.
Parameters
path
The path for which to list associated paths. If the path is a directory, it retrieves paths contained within it. If it is a file, it returns the file itself.