Changeset 1038 for trunk/src/dir_uvmat.m


Ignore:
Timestamp:
May 1, 2018, 5:11:39 PM (6 years ago)
Author:
g7moreau
Message:
  • Better comment, better format
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dir_uvmat.m

    r1037 r1038  
    1 %'dir_uvmat': list the content of a folder, extending 'dir' to the case of OpenDap server
     1%'dir_uvmat': list the content of a folder, extending 'dir' to the case of OpeNDAP server
    22%--------------------------------------------------------------------
    33%[RootPath,SubDir,RootFile,i1,i2,j1,j2,Ext,NomType]=fileparts_uvmat(FileInput)
     
    2727%=======================================================================
    2828
    29 function [ ListFiles,errormsg] = dir_uvmat(DirName)
     29function [ListFiles,errormsg] = dir_uvmat(DirName)
    3030errormsg='';
    3131if regexp(DirName,'^http://')
     32    % OpeNDAP case - read catalog.xml file
    3233    catalog=[DirName,'/catalog.xml'];
    3334    try
     
    3839        return
    3940    end
    40     ListFiles=(regexp(str,'xlink:title="(?<name>[^"]+)"','names'))';%list subfolders
     41    ListFiles=(regexp(str,'xlink:title="(?<name>[^"]+)"','names'))'; % list subfolders
    4142    NumDir=numel(ListFiles);
    42     ListFiles=[ListFiles;(regexp(str,'dataset name="(?<name>[^"]+)"','names'))'];% append files to the list
     43    ListFiles=[ListFiles;(regexp(str,'dataset name="(?<name>[^"]+)"','names'))']; % append files to the list
    4344    for ilist=1:numel(ListFiles)
    4445        ListFiles(ilist).date=0;
     
    5253    ListFiles(NumDir+1)=[];
    5354else
     55    % Standart case
    5456    ListFiles=dir(DirName);
    5557end
Note: See TracChangeset for help on using the changeset viewer.