/* There is no FPrintF type function and no way to grow files. Therefore, use memory to hold the file until you are done. The Ltf framework is convenient for this. */ #include "/LT/DEMO/TreeDemoJoin" void FPrintFDemo(I1 *output_filename=NULL) { FlagsStruct f; Ltf *l=LtfNew; GetFFlags(&f,"ST_FILE_UTIL_FLAGS","+r"); LtfPutS(l,"$$TR -C+AL,\"\"$$\r\n"); LtfPutS(l,"$$ID,+2$$"); TreeSub(l,FindFiles("/LT/*",&f.on)); LtfPutS(l,"$$ID,-2$$"); LtfRecalc(l); if (output_filename) { StrCpy(l->filename.name,output_filename); LtfWrite(l,FALSE); } else LtfWrite(l,TRUE); LtfDel(l); } FPrintFDemo;