How do I find the path to the public folder? Within my Craft plugin code, how do I find the path to Craft's public/ folder? There doesn't seem to be a constant listed in Craft Docs: PHP Constants like there is for all the other key folders.
Lots of good discussion on how to do this and the pros/cons of each here: https://stackoverflow.com/questions/4645082/get-absolute-path-of-current-script

In short, the most reliable way is to use PHP's debug_backtrace.

$debugTrace = debug_backtrace();
$initialCalledFile = count($debugTrace) ? $debugTrace[count($debugTrace) - 1]['file'] : __FILE__;
$publicFolderPath = dirname($initialCalledFile);