function fullPathList = listFiles(directoryPath,fileType)
    if contains(fileType,".h5")
        % Use the dir function to get the file listing
        fileList = dir(fullfile(directoryPath, '*.h5'));
    
        % Initialize a cell array to store the full path names
        fullPathList = cell(length(fileList), 1);
    
        % Iterate through the fileList and store the full path names in the cell array
        for i = 1:length(fileList)
            if ~fileList(i).isdir
                fullPathList{i} = fullfile(directoryPath, fileList(i).name);
            end
        end
    end 


    if contains(fileType,".csv")
        % Use the dir function to get the file listing
        fileList = dir(fullfile(directoryPath, '*.csv'));
    
        % Initialize a cell array to store the full path names
        fullPathList = cell(length(fileList), 1);
    
        % Iterate through the fileList and store the full path names in the cell array
        for i = 1:length(fileList)
            if ~fileList(i).isdir
                fullPathList{i} = fullfile(directoryPath, fileList(i).name);
            end
        end
    end 





end
