" > BLib.FileIO 1.05 18Apr2008 0 v1.04 22Mar2008 JGH: FNgbpb8 strips spaces < v1.01 07Sep2006 JGH: FNargs avoid zero page on RISC OS (* v1.00 09Aug1988 JGH: Initial version 2: <% General File Interface Routines F% =============================== P: Z, Returns file type, file info in X%!... d, -------------------------------------- nBݤfile(A$,A%):$name%=A$:?X%=name%:X%?1=name%256:=(&FFDD)&FF x:  General OSGBPB call  ------------------- Tgbpb(A%,chn%,addr%,num%,ptr%):?X%=chn%:X%!1=addr%:X%!5=num%:X%!9=ptr%:&FFD1: : @ Return current disk (5), directory (6) or library (7) name @ ---------------------------------------------------------- Yݤgbpb(A%):X%!1=name%:&FFD1:A%=name%+((1+?name%)((A%-2)=6)):A%?(1+?A%)=13:=$(A%+1) : B Returns entry in current directory, or null string if at end B ------------------------------------------------------------ Eݤgbpb8(ptr%):X%!1=name%:X%!5=1:X%!9=ptr%:A%=8:&FFD1:X%!5=1:="" 7A%=name%+1:A%!(A%?-1)=&D20:A%?($A%," ")-1)=13:=$A% : K Returns entry and info in current directory, or null string if at end K --------------------------------------------------------------------- ݤgbpb11(ptr%) "Nos%=6:>&FFFF:ș"OS_GBPB",11,"",name%,1,ptr%,79,,,X%!5,X%!9:X%!5=0:="" ,Eos%=6:>&FFFF:ș"OS_WriteN",name%+29 $(name%+29):=$(name%+29) 6?X%?0=0:X%!1=name%:X%!5=1:X%!9=ptr%:A%=11:&FFD1:X%!5=0:="" @Cname%!39=&D00:A%=$(name%+29),0):name%?(A%+28)=13:=$(name%+29) J: T6 OSARGS call with data. Returns any returned data ^6 ------------------------------------------------ h3ݤargs(A%,Y%,ptr%):X%,E%:?(P-3)=0:E%=Y%:Y%=0 r0>&FFFF:ș"OS_Args",A%,Y%,ptr%,,ptr%:=ptr% |%!&70:X%=&70:!X%=ptr%:&FFDA:=!X% : ' OSARGS call ignoring X, returns A ' --------------------------------- .ݤargsA(A%):>&FFFF:ș"OS_Args",A%A%:=A% 'X%,Y%,E%,!&70:X%=&70:=(&FFDA)&FF : & Get current filing system number & --------------------------------  ݤfs:A%,Y%,E%:=(&FFDA)&FF :