Changeset 570 for trunk/src/browse_data.m
- Timestamp:
- Feb 20, 2013, 8:28:09 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r569 r570 92 92 set(handles.CreateMirror,'String','create_mirror') 93 93 end 94 SourceDir_Callback([],[], handles) 94 scan_campaign(handles,Campaign) 95 % SourceDir_Callback([],[], handles) 95 96 set(handles.edit_xml,'Visible','off') 96 97 set(handles.HELP,'Visible','off') … … 177 178 178 179 %------------------------------------------------------------------------ 179 function SourceDir_Callback(hObject, eventdata, handles)180 %------------------------------------------------------------------------ 181 set(handles.SourceDir,'BackgroundColor',[1 1 0])180 function scan_campaign(handles,Campaign) 181 %------------------------------------------------------------------------ 182 %set(handles.SourceDir,'BackgroundColor',[1 1 0]) 182 183 drawnow 183 SourceDir=get(handles.SourceDir,'String');184 MirrorDir=get(handles.MirrorDir,'String');184 %SourceDir=get(handles.SourceDir,'String'); 185 %MirrorDir=get(handles.MirrorDir,'String'); 185 186 ExpName={''}; 186 if exist( SourceDir,'dir')187 hdir=dir( SourceDir); %list files and dirs187 if exist(Campaign,'dir') 188 hdir=dir(Campaign); %list files and dirs 188 189 idir=0; 189 190 for ilist=1:length(hdir) … … 193 194 idir=idir+1; 194 195 ExpName{idir}=hdir(ilist).name; 195 mirror=fullfile(MirrorDir,ExpName{idir});196 if ~exist(mirror,'dir')197 mkdir(mirror)198 end199 196 end 200 % look for the list of 'devices'201 else202 %warning for isolated files203 197 end 204 198 end 205 199 set(handles.ListExperiments,'String',[{'*'};ExpName']) 206 200 set(handles.ListExperiments,'Value',1) 207 ListExperiments_Callback( hObject, eventdata, handles)208 else 209 msgbox_uvmat('ERROR',['The input ' SourceDir' is not a directory'])210 end 211 set(handles.SourceDir,'BackgroundColor',[1 1 1])201 ListExperiments_Callback([],[], handles) 202 else 203 msgbox_uvmat('ERROR',['The input ' Campaign ' is not a directory']) 204 end 205 %set(handles.SourceDir,'BackgroundColor',[1 1 1]) 212 206 213 207 … … 233 227 idir=0; 234 228 for ilist=1:length(hdir) 235 if ~isequal(hdir(ilist).name(1),'.') 236 source=fullfile(SourcePath,ListExperiments{iexp},hdir(ilist).name); 237 mirror=fullfile(MirrorPath,ListExperiments{iexp},hdir(ilist).name); 238 if ~exist(mirror) 239 system(['ln -s ' source ' ' mirror]) 229 if ~isequal(hdir(ilist).name(1),'.') 230 source=fullfile(SourcePath,ListExperiments{iexp},hdir(ilist).name); 231 if ~isempty(MirrorPath) 232 mirror=fullfile(MirrorPath,ListExperiments{iexp},hdir(ilist).name); 233 if ~exist(mirror) 234 system(['ln -s ' source ' ' mirror]) 235 end 236 end 237 check_list=strcmp(hdir(ilist).name,ListDevices); 238 if isempty(find(check_list)) 239 ListDevices=[ListDevices;hdir(ilist).name]; 240 end 240 241 end 241 check_list=strcmp(hdir(ilist).name,ListDevices);242 if isempty(find(check_list))243 ListDevices=[ListDevices;hdir(ilist).name];244 end245 end246 242 end 247 243 end
Note: See TracChangeset
for help on using the changeset viewer.