Changeset 1038 for trunk/src/dir_uvmat.m
- Timestamp:
- May 1, 2018, 5:11:39 PM (6 years ago)
- 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 Ope nDapserver1 %'dir_uvmat': list the content of a folder, extending 'dir' to the case of OpeNDAP server 2 2 %-------------------------------------------------------------------- 3 3 %[RootPath,SubDir,RootFile,i1,i2,j1,j2,Ext,NomType]=fileparts_uvmat(FileInput) … … 27 27 %======================================================================= 28 28 29 function [ 29 function [ListFiles,errormsg] = dir_uvmat(DirName) 30 30 errormsg=''; 31 31 if regexp(DirName,'^http://') 32 % OpeNDAP case - read catalog.xml file 32 33 catalog=[DirName,'/catalog.xml']; 33 34 try … … 38 39 return 39 40 end 40 ListFiles=(regexp(str,'xlink:title="(?<name>[^"]+)"','names'))'; %list subfolders41 ListFiles=(regexp(str,'xlink:title="(?<name>[^"]+)"','names'))'; % list subfolders 41 42 NumDir=numel(ListFiles); 42 ListFiles=[ListFiles;(regexp(str,'dataset name="(?<name>[^"]+)"','names'))']; % append files to the list43 ListFiles=[ListFiles;(regexp(str,'dataset name="(?<name>[^"]+)"','names'))']; % append files to the list 43 44 for ilist=1:numel(ListFiles) 44 45 ListFiles(ilist).date=0; … … 52 53 ListFiles(NumDir+1)=[]; 53 54 else 55 % Standart case 54 56 ListFiles=dir(DirName); 55 57 end
Note: See TracChangeset
for help on using the changeset viewer.