private function expected_alias_location($filerecord) {

        $filedesc = '/'.$filerecord->contextid.'/'.$filerecord->component.'/'.$filerecord->filearea;
        if (!is_null($filerecord->itemid)) {
            $filedesc .= '/'.$filerecord->itemid;
        }
        $filedesc .= $filerecord->filepath.$filerecord->filename;

        return $filedesc;
    }
private function expected_alias_location($filerecord) {

        $filedesc = '/'.$filerecord->contextid.'/'.$filerecord->component.'/'.$filerecord->filearea;
        if (!is_null($filerecord->itemid)) {
            $filedesc .= '/'.$filerecord->itemid;
        }
        $filedesc .= $filerecord->filepath.$filerecord->filename;

        return $filedesc;
    }
private function expected_alias_location ( $ filerecord ) { $ filedesc = '/' . $ filerecord -> contextid . '/' . $ filerecord -> component . '/' . $ filerecord -> filearea ; if ( ! is_null ( $ filerecord -> itemid ) ) { $ filedesc .= '/' . $ filerecord -> itemid ; } $ filedesc .= $ filerecord -> filepath . $ filerecord -> filename ; return $ filedesc ; }
Return the expected location of a file

Please note this may and may not work as a part of URL to pluginfile.php
(depends on how the given component/filearea deals with the itemid).

@param stdClass $filerecord
@return string
Return the expected location of a file