You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: spm_mesh_detect.m
    path of file: ./repos/bspm/thirdparty/spm12
    
    the code of the file until where you have to start completion: function s = spm_mesh_detect(F)
% True for valid representation of a mesh
% FORMAT s = spm_mesh_detect(F)
% F        - variable to query: filename, vol structure, patch structure
% s        - true if F corresponds to a mesh, and false otherwise
%__________________________________________________________________________
% Copyright (C) 2012 Wellcome Trust Centre for Neuroimaging


    
function s = spm_mesh_detect(F)
% True for valid representation of a mesh
% FORMAT s = spm_mesh_detect(F)
% F        - variable to query: filename, vol structure, patch structure
% s        - true if F corresponds to a mesh, and false otherwise
%__________________________________________________________________________
% Copyright (C) 2012 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: spm_mesh_detect.m 5065 2012-11-16 20:00:21Z guillaume $

s = false;

if iscellstr(F) || ischar(F)
    F = cellstr(F);
    [p,n,e] = spm_fileparts(F{1});
    if strcmpi(e,'.gii')
        s = true;
    end