echo CRM_Utils_System::currentPath();
$file = 'example.txt'; $path = CRM_Utils_System::currentPath() . "/$file"; if (file_exists($path)) { echo "$file exists"; } else { echo "$file does not exist"; }This code will check if a file named example.txt exists in the current path. If the file exists, it will display "example.txt exists", otherwise it will display "example.txt does not exist". Package library: CRM_Utils_System is part of the CiviCRM package library, which is an open-source constituent relationship management software.