program fs; uses jsr75; var i,k,num,c,nump,numf,path,w,h:integer; spp:array[99] of string; spf:array[99] of string; sp,sf,adr:string;a:boolean; procedure scr;begin; sc(0,0,0); fr(0,0,w,h); sc(250,100,0); dt(adr,0,0); fr(0,c*10+10,w,10); sc(250,250,250); for i:=0 to nump do begin; dt(spp[i],0,i*10+10); end; for i:=0 to numf do begin; dt(spf[i],0,i*10+10+numf*10); end;end; procedure name; begin; for i:=0 to num do begin; for k:=0 to 99 do begin; spp[i]:=spp[i]+copy(sp,k,k+1); if copy(sp,k,k+1)=getchar('|',0) then break; end; for k:=0 to 99 do begin; spf[i]:=spf[i]+copy(sf,k,k+1); if copy(sf,k,k+1)=getchar('|',0) then break; end; end; end; procedure opendir; begin; if keytoaction(getkeypressed)=ga_fire then if c<=nump then adr:=adr+spp[c]; end; procedure nav; begin; key:=keytoaction(getkeypressed); if key=ga_up then c:=c-1; if key=ga_down then c:=c+1; if c<0 then c:=num; if c>num then c:=0;end; procedure data; begin; if path:=1 then sp:=jsr75.get_roots; if path<>1 then sp:=jsr75.get_dirs(adr); sf:=jsr75.get_files(adr); for i:=0 to 999 do begin; if copy(sp,i,i+1)=getchar('|',0) then nump:=nump+1; if copy(sf,i,i+1)=getchar('|',0) then numf:=numf+1; end; num:=numf+nump; end; begin a:=true; path:=1;c:=0; while a do begin; data;name;opendir;nav;scr;end; end.