Using TPathName is just one way you can obtain a file system entity. The preferred way to get a file system entity is for an external program (such as the workspace) to pass a file system entity to your application. You can also obtain a file system entity using an iterator.
"Using file system entities and pathnames" on page 49 shows how to retrieve an entity by providing the pathname, as well as how to find the path of a file system entity using the same class.