public function getFilePath($fieldName = null, $createPath = true)
    {
        $path = realpath(AppComponent::getUploadsDir($this->container)) . "/" . $this->getFileUri($fieldName);

        foreach ($this->getFileInfo() as $fileInfo) {
            if (isset($fileInfo["field"]) && isset($fileInfo["path"]) && $fieldName == $fileInfo["field"]) {
                $path = $fileInfo["path"];
                break;
            }
        }

        if ($createPath && !is_dir($path)) {
            mkdir($path, 0775, true);
        }

        return $path;
    }
public function getFilePath($fieldName = null, $createPath = true)
    {
        $path = realpath(AppComponent::getUploadsDir($this->container)) . "/" . $this->getFileUri($fieldName);

        foreach ($this->getFileInfo() as $fileInfo) {
            if (isset($fileInfo["field"]) && isset($fileInfo["path"]) && $fieldName == $fileInfo["field"]) {
                $path = $fileInfo["path"];
                break;
            }
        }

        if ($createPath && !is_dir($path)) {
            mkdir($path, 0775, true);
        }

        return $path;
    }
public function getFilePath ( $ fieldName = null , $ createPath = true ) { $ path = realpath ( AppComponent :: getUploadsDir ( $ this -> container ) ) . "/" . $ this -> getFileUri ( $ fieldName ) ; foreach ( $ this -> getFileInfo ( ) as $ fileInfo ) { if ( isset ( $ fileInfo [ "field" ] ) && isset ( $ fileInfo [ "path" ] ) && $ fieldName == $ fileInfo [ "field" ] ) { $ path = $ fileInfo [ "path" ] ; break ; } } if ( $ createPath && ! is_dir ( $ path ) ) { mkdir ( $ path , 0775 , true ) ; } return $ path ; }
Get files base path

@param null $fieldName  file field name
@param bool $createPath check and create path?
@return string
Get files base path