src/ScContent/Service/Dir.php
public function appUploads($path = '', $checkIfExists = false)
    {
        $appUploadsDir = getcwd() . $this->getRelativeAppUploadsDir();
        if ($checkIfExists) {
            return realpath($appUploadsDir . DS . $path);
        }
        if (empty($path)) {
            return $appUploadsDir;
        }
        return $appUploadsDir . DS . $this->normalizePath($path);
    }
public function appUploads($path = '', $checkIfExists = false)
    {
        $appUploadsDir = getcwd() . $this->getRelativeAppUploadsDir();
        if ($checkIfExists) {
            return realpath($appUploadsDir . DS . $path);
        }
        if (empty($path)) {
            return $appUploadsDir;
        }
        return $appUploadsDir . DS . $this->normalizePath($path);
    }
public function appUploads ( $ path = '' , $ checkIfExists = false ) { $ appUploadsDir = getcwd ( ) . $ this -> getRelativeAppUploadsDir ( ) ; if ( $ checkIfExists ) { return realpath ( $ appUploadsDir . DS . $ path ) ; } if ( empty ( $ path ) ) { return $ appUploadsDir ; } return $ appUploadsDir . DS . $ this -> normalizePath ( $ path ) ; }
Returns the path to the upload directory, or any child path.

If the flag "checkIfExists" is set to TRUE, checks for the specified
path and if the path was not found, returns FALSE.

Usage:
<code>
$dir = $serviceLocator->get('ScService.Dir');
$uploadedFile = $dir->appUploads('test.jpg');
</code>

@api

@param  string  $path
@param  boolean $checkIfExists optional default false
@return string
Returns the path to the upload directory or any child path .