This question has been answered by multiple community members. See the first response.
* Get the contents of the file
*
* @return string The contents of the file
*/
public function getContents() {
return @file_get_contents($this->path);
}
$file = MODX_BASE_PATH . 'path/to/file';
if (file_exists($file)) {
$content = file_get_contents($file);
}