public static function draftfile_exists($itemid, $filepath, $filename) {
        global $USER;
        $fs = get_file_storage();
        $usercontext = context_user::instance($USER->id);
        return $fs->file_exists($usercontext->id, 'user', 'draft', $itemid, $filepath, $filename);
    }
public static function draftfile_exists($itemid, $filepath, $filename) {
        global $USER;
        $fs = get_file_storage();
        $usercontext = context_user::instance($USER->id);
        return $fs->file_exists($usercontext->id, 'user', 'draft', $itemid, $filepath, $filename);
    }
public static function draftfile_exists ( $ itemid , $ filepath , $ filename ) { global $ USER ; $ fs = get_file_storage ( ) ; $ usercontext = context_user :: instance ( $ USER -> id ) ; return $ fs -> file_exists ( $ usercontext -> id , 'user' , 'draft' , $ itemid , $ filepath , $ filename ) ; }
Check if file already exists in draft area.

@static
@param int $itemid of the draft area.
@param string $filepath path to the file.
@param string $filename file name.
@return bool
Check if file already exists in draft area .