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: getallfiles.m
    path of file: ./repos/3DCS/utils
    
    the code of the file until where you have to start completion: function [ filenames ] = getallfiles( filedir )
%GETALLFILES get all the file names of a directory
%   filenames=GETALLFILES(filedir) returns all the filenames of the filedir
%   in the form of cell. Each file can be access by filenames{$fileorder$}
%   then, where fileorder is the default order of the file in filedir.

    
function [ filenames ] = getallfiles( filedir )
%GETALLFILES get all the file names of a directory
%   filenames=GETALLFILES(filedir) returns all the filenames of the filedir
%   in the form of cell. Each file can be access by filenames{$fileorder$}
%   then, where fileorder is the default order of the file in filedir.
alldir = dir(filedir);
alldir = alldir(~ismember({alldir.name},{'.','..'}));
filenames = {alldir.name}';
filenames = strcat({[filedir, '\']}, filenames);
end