Re: File list/scan loadable module
By: Digital Man to Nightfox on Fri Feb 24 2023 08:29 pm
>> 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?
DM> You mean FI_INFO (not FL_INFO). The "FI" stands for file info, so only use
DM> those values in a fileinfo loadable module.
DM> For a listfiles module, 0 means FL_NONE. "FL" steads for file list. Get
DM> it?
Yes, that was a typo.
DM> Are you trying to use the same script to implement both module types? If
DM> so, you'd need to pass an extra parameter (that you define) to determine
DM> whether it's a file "list" or an "info" request.
Ah, I see. I was thinking the same script could do both, but for now I might just implement my file lister for the FL_ options.
Nightfox
---
þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|