TIP: Click on subject to list as thread! ANSI
echo: synchronet
to: Nightfox
from: Digital Man
date: 2023-02-24 20:29:00
subject: File list/scan loadable m

  Re: File list/scan loadable module
  By: Nightfox to Digital Man on Fri Feb 24 2023 07:31 pm

 > Hi DM,
 >
 > I started testing the file list/scan loadable module feature.  One thing I
 > noticed is that when I call bbs.list_files() or bbs.list_file_info(), the
 > same types of parameters are passed in argv:
 > argv[0]: Directory internal code
 > argv[1]: 0
 > argv[2]: Filespec
 >
 > In both cases (bbs.list_files() or bbs.list_file_info()), the 2nd argument
 > is 0. Both FL_NONE and FL_INFO are defined as 0, so I'm wondering how to
 > differentiate between the two?

You mean FI_INFO (not FL_INFO). The "FI" stands for file info, so only use those values in a fileinfo loadable module.

For a listfiles module, 0 means FL_NONE. "FL" steads for file list. Get it?

 > I'm not sure how to determine whether the
 > user wants to just list the files with the given filespec (FL_NONE) or
 > display extended information (FI_INFO).

Are you trying to use the same script to implement both module types? If so,
you'd need to pass an extra parameter (that you define) to determine whether it's a file "list" or an "info" request.
-- 
                                            digital man (rob)

Synchronet "Real Fact" #29:
Rob Swindell first called BBSes (at 300bps) with an Apple II computer in 1982
Norco, CA WX: 49.6øF, 86.0% humidity, 8 mph NE wind, 0.20 inches rain/24hrs
--- SBBSecho 3.20-Linux
                                                                       
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.