BAJA "FILE_VIEW" Equivalent in Javascript
From
High Spirit@VERT/DCBBS to
All on Mon Dec 10 13:52:31 2018
Thought I'd share with other Synchronet Sysops...ããI have converted the BAJA command "FILE_VIEW" to a Javascript command and addedãa few output lines showing what libs and dirs are being searched.ããfunction ViewFiles() {ã printf("\r\nView File(s)\r\n");ã var FILESPEC;ã if (FILESPEC = bbs.get_filespec() + "*") {ã if(bbs.list_files(file_area.lib_list[bbs.curlib].dir_list[bbs.curdir].number,ãFILESPEC, FL_VIEW)){ã return;ã }ã printf("%s", bbs.text(166));ã for(i=0;i<file_area.lib_list[bbs.curlib].dir_list.length;i++) {ã if(i!=bbs.curdir) {ã printf("Searching %s...\r\n",ãfile_area.lib_list[bbs.curlib].dir_list[i].name);ã if(bbs.list_files(file_area.lib_list[bbs.curlib].dir_list[i].number,ãFILESPEC, FL_VIEW)){ã return;ã }ã }ã }ã if(i<file_area.lib_list[bbs.curlib].dir_list.length){ã return;ã }ã printf("\r\n");ã printf("%s", bbs.text(167));ã for(i=0;i<file_area.lib_list.length;i++) {ã if(i!=bbs.curlib) {ã for(j=0;j<file_area.lib_list[i].dir_list.length;j++) {ã printf("Searching %s - %s...\r\n", file_area.lib_list[i].name,ãfile_area.lib_list[i].dir_list[j].name);ã if(bbs.list_files(file_area.lib_list[i].dir_list[j].number, FILESPEC,ãFL_VIEW)){ã return;ã }ã }ã }ã }ã printf("%s", bbs.text(290));ã console.pause();ã }ã}ãã-- High Spirit Digital Realms Main - connect.digitalrealms.net 23ã Digital Realms C=64 - connect.digitalrealms.net 6400ãã---ã þ Synchronet þ Digital Realms BBS - connect.digitalrealms.netã