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: file_array.m
    path of file: ./repos/CBIG/external_packages/matlab/non_default_packages/palm/palm-alpha109/fileio/@file_array
    
    the code of the file until where you have to start completion: function a = file_array(varargin)
% Function for creating file_array objects.
% FORMAT a = file_array(fname,dim,dtype,offset,scl_slope,scl_inter,permission)
% a          - file_array object
% fname      - filename

    
function a = file_array(varargin)
% Function for creating file_array objects.
% FORMAT a = file_array(fname,dim,dtype,offset,scl_slope,scl_inter,permission)
% a          - file_array object
% fname      - filename
% dim        - dimensions (default = [0 0] )
% dtype      - datatype   (default = 'uint8-le')
% offset     - offset into file (default = 0)
% scl_slope  - scalefactor (default = 1)
% scl_inter  - DC offset, such that dat = raw*scale + inter (default = 0)
% permission - Write permission, either 'rw' or 'ro' (default = 'rw')
% _______________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

%
% $Id: file_array.m 4136 2010-12-09 22:22:28Z guillaume $


if nargin==1
    if isstruct(varargin{1}),
        a = class(varargin{1},'file_array');
        return;
    elseif isa(varargin{1},'file_array'),
        a = varargin{1};
        return;
    end