TBBS 2.x - File Areas and TBBS

Contact:   eSoft, Inc. (Makers of TBBS)
           15200 E. Girard Ave., Suite 3000
           Aurora, CO  80014
           (303) 699-6565      Voice
           (303) 699-6872      Fax
           (303) 699-8222      BBS
           support@esoft.com   E-Mail

FILE AREAS AND TBBS
-------------------

TBBS offers several different forms of file upload and download mechanisms.  
They are:

        PSEUDO DIRECTORIES

                These are analogous to typical BBS-style upload
                and download areas.  Files are listed with name,
                size, date and file description.

        PRIVATE PSEUDO DIRECTORIES

                Just like normal pseudo directories in every way,
                except a user only sees and is able to access his
                own files.

        RAW UPLOAD AND DOWNLOAD

                These allow file transfer directly to and from a 
                sub-directory on the disk, and do not include 
                descriptions.

        FILE ENCLOSURE (ELECTRONIC ENVELOPE)

                This mechanism allows users to enclose (attach)
                an uploaded file with a message on the system. 
                Any person who can read the message can also 
                download the enclosed file, so they can be
                public or private in nature.

        SINGLE FILE DOWNLOAD

                This allows a particular menu entry to activate
                the downloading a single, pre-defined file.  (This
                is an extension of the Type 1 menu command.)

        FAMILY NAME DOWNLOAD

                Used in conjunction with the family name file
                display, allows files with a similar naming
                convention to be accessed as a group.  (This is
                an extension of the Type 2 menu command.)

We will now have a brief description of how each of these mechanisms are 
implemented.

                              Psuedo Directories 

Pseudo directories are so named because the files listed in a pseudo directory 
have little to do with a disk directory structure; the files are listed in a 
regular, flat ASCII text file along with their ownership and description 
information.  This text file is itself the "pseudo directory" and has a file 
extension of .DIR (for directory).  For this reason, pseudo directory files 
are normally called simply "DIR" (pronounced "derr") files.

Normally, a DIR file and the files it references are in the same physical 
directory on the hard disk.  Other DIR files, and the files they reference, 
are in different physical directories on the hard disk.

Let's take an example.  Suppose we are a computer hardware company, and want 
to create two file areas, one for the company's video drivers and one for 
printer drivers.  We have all the files, but we need to create an organization 
within TBBS for them.  

Since it seems logical enough, we'll make a directory named C:\VIDEO for all 
the video drivers, and another named C:\PRINTER for all the printer drivers.  
NOTE:  You can use any directory name or structure you want to with your own 
file areas!

After creating the two directories, we copy the files into the proper 
directory.  If we issue a DOS DIR command on the two directories, we'll see:

         Volume in drive C has no label
         Directory of C:\VIDEO

        .            <DIR>     10-01-90   6:31p
        ..           <DIR>     10-01-90   6:31p
        AK3200   DVR       815 06-20-90  10:00a
        AK3300   DVR      1024 05-29-90   9:32a
        BL720    DVR      3281 03-23-89  11:12a
                3 File(s)   3727360 bytes free


         Volume in drive C has no label
         Directory of C:\PRINTER

        .            <DIR>     10-01-90   6:32p
        ..           <DIR>     10-01-90   6:32p
        DML-1671 PTR      3277 09-25-90   8:27a
        DML-1770 PTR      1511 09-25-90   8:31a
        LP-500   PTR      9188 12-01-89   3:45p
        LP-550   PTR     10121 12-01-89   4:45p
                4 File(s)   3727360 bytes free

Next, we need to create DIR files for these two areas.  This is accomplished 
using a text editor (such as DOS' EDLIN, QEDIT, BRIEF, etc.) or your favorite 
word processor in non-document or text mode.  The complete DIR file format is 
shown in the TBBS manual in the FILE XFER section (chapter 4), but for the 
purposes of getting started, we'll show an abbreviated format.  Let's start 
with the VIDEO directory, so you'll switch to the C:\VIDEO directory.

Create a file named FILES.DIR.  This will be our DIR file.  The file will have 
just three lines, as follows:

    AK3200.DVR    AK3200.DVR   'SYSOP'   Driver for AK3200 EGA Card
    AK3300.DVR    AK3300.DVR   'SYSOP'   Driver for AK3300 VGA Card
    BL720.DVR     BL720.DVR    'SYSOP'   Driver for BL720 Monochrome Card

Obviously, you would list your own files here.  As you can tell, there are 
four important portions to the file:

        The FILE NAME.  This is actually listed TWICE usually.  The first
        appearance and the second can have different meaning, but normally 
        they are identical.  (Refer to the manual for details.)

        The OWNERSHIP.  This is the name of the user who uploaded the file.
        Since you're starting out fresh, put SYSOP in this field.  The 
        ownership field is enclosed in SINGLE QUOTES (apostrophes).

        The DESCRIPTION.  This is up to 40 characters of descriptive text.
        This tells the user what a particular file is.

Next, you would put together another pseudo directory in the C:\PRINTER 
directory.  You can also call that one FILES.DIR, like you did the other 
pseudo directory file.  The formatting is identical to what we just did. 

After creating the two pseudo directory files, you will need to create menu 
entries to allow download access to the file areas you just created.

For this, a menu Type 46, Pseudo Directory Download, is used.  Build a menu 
entry in the normal manner.  For Opt Data, you will need to designate the 
drive, directory, and the name of the DIR file (WITHOUT the .DIR file 
extension).  For a typical download area look, the default switches for Opt 
Data will not be appropriate, so you must add the /F switch to the end.

The Opt Data lines for our two file areas would look like this:

        C:\VIDEO\FILES /F

and

        C:\PRINTER\FILES /F

When you log on to the system again, you will see these two new menu entries.  
When you select them, TBBS will display the files in the C:\VIDEO directory 
like this:

    AK3200.DVR       815   6-20-90  Driver for AK3200 EGA Card
    AK3300.DVR      1024   5-29-90  Driver for AK3300 VGA Card
    BL720.DVR       3281   3-23-90  Driver for BL720 Monochrome Card

    <A>rea, <D>ownload, <P>rotocol, <E>xamine, <N>ew, <H>elp, or <L>ist
    Selection or <CR> to exit:

TBBS would display the files in the C:\PRINTER directory like this:

    DML-1671.PTR    3277   9-25-90  Driver, Dot Matrix Ptr DML-1671
    DML-1770.PTR    1511   9-25-90  Driver, Dot Matrix Ptr DML-1770 
    LP-500.PTR      9188  12-01-89  Driver, Laser Ptr LP-500
    LP-550.PTR     10121  12-01-89  Driver, Laser Ptr LP-550
    
    <A>rea, <D>ownload, <P>rotocol, <E>xamine, <N>ew, <H>elp, or <L>ist
    Selection or <CR> to exit:

Notice how this list resembles the DOS directory command.  It's different in 
that the time stamp of the file is not displayed, but a file description is.  
Note that the ownership field is NOT displayed.  The ownership field is for 
your reference only so that you can know which users uploaded which files.

Your users can now download the files!  But what about uploading you might 
ask?

Uploading works exactly the same way, but you don't have to create anything in 
advance for uploading to work.  The menu entry is nearly identical to the 
download menu entry, except you use menu Type 47 instead.  On the Opt Data 
line, you still put the drive, directory and name of the DIR file (WITHOUT the 
.DIR extension).  TBBS will query the user for the proper information.

You may have a download menu entry for a pseudo directory, and an upload menu 
entry for the very same pseudo directory.  This would allow users to upload 
and download files themselves, with no Sysop intervention.  

You may wish to create a separate pseudo directory just for uploads, and make 
no download entry for the area.  You as Sysop could move the files yourself 
after reviewing the uploads.  This would allow your users to upload files, but 
download only those files you provide for them.  

How you arrange and implement pseudo directories is entirely up to you, and is 
just another example of the flexibility of TBBS. 

                          Private Pseudo Directories

Private pseudo directories are identical to regular pseudo directories in 
every way, except that users may download only those files which they have 
uploaded.  

The Sysop sees all files in a private pseudo directory, not just his own.  A 
private pseudo directory is generally intended for use as a file submission 
mechanism where files need to be uploaded to the system, but not downloaded by 
other users.  

The Sysop can make files available to a particular user just by manually 
changing the ownership field in the DIR file.  Again, this is done using a 
text editor, or a word processor in non-document or text mode.  With a private 
pseudo directory, the ownership field in the DIR file controls which files a 
particular user can see - they see only those files with an ownership field 
that matches their name.  All other files may as well not exist to that user, 
and are not displayed at all to them.

Private pseudo directories are implemented just like regular pseudo 
directories.  The ONLY difference is the addition of the /P switch to the end 
of the Opt Data line of a Type 46 (download) menu entry.  That's it.  The /P 
tells TBBS that the pseudo directory is private, and nothing else is needed.

                            Raw Upload and Download

Raw upload and download allows users to transfer files to and from a 
particular directory on the disk directly.  There is no pseudo directory, so 
consequently, there is no ownership information or file description.  All 
files are shown to all users who have access to the menu commands that control 
the upload or download.

Generally, raw upload and download is used exclusively by the Sysop and not 
made available to users, since it gives full file access to any file in the 
designated directory.  NOTE:  Sub-directories at the DOS level "under" the 
designated directory are NOT accessible - only files in the designated 
directory itself.  

Raw upload and download can also be used in any situation where a "quick and 
dirty" file transfer mechanism is needed, and any users with access already 
know the contents of the files based only on the file name.

Raw uploads are implemented with a menu Type 28 or Type 29, depending on 
whether overwrites are allowed.  With a menu Type 28, a user MAY NOT upload a 
file if a file of the same name already exists.  With a menu Type 29, a user 
MAY upload a file of the same name, in which case the old file is overwritten 
and is NOT recoverable through any means.  

Raw downloads are implemented with a menu Type 34.

Menu Type 28, Type 29 and Type 34 have identical Opt Data - the drive and 
directory you wish to make accessible in standard DOS notation.

                                File Enclosure

File enclosure allows users to enclose a single file with a message.  The file 
can be any type of file in any form (including binary or non-DOS format).  The 
file "follows" the message around, and when the message is deleted, so is the 
file.  NOTE:  Anyone who has access to a message with an enclosed file can 
also download the enclosed file.  Message access should be controlled as 
necessary to prevent unauthorized file access!  Of course, the Sysop may see 
any message on the system, and therefore has access to all enclosed files.

File enclosures are controlled and configured through several means.  

First, a special sub-directory must be created in which enclosed files will be 
held.  Enclosed files are all written to the same directory so that MFSQZ (the 
TBBS message base maintenance program) can find and maintain them properly 
with the message to which they are enclosed.  The directory can be anywhere on 
your disk, and is designated on the CEDIT MESSAGE BASE OPTIONS screen.  Files 
enclosed with messages are stored in this directory with a special naming 
convention (NOT by their real names) so that MFSQZ can know which files go 
with which messages.

Second, access to file enclosures can be limited by priviledge level.  You set 
this level on the CEDIT MESSAGE BOARD OPTIONS screen.  The level you set 
controls only which users can enclose a file with a message, not whether a 
user can download an enclosed file.  It's possible, for example, for one user 
with adequate priviledges to enclose a file with a message that is later read 
by a user with too low a priviledge to enclose a file himself, but that user 
CAN download the enclosed file.  ANY user allowed access to the message can 
download a file enclosed with it, regardless of priviledge level.

Third, you may selectively turn on and off file enclosures on a message board 
by message board basis.  If you don't want file enclosures on a particular 
board, simply tell TBBS not to allow it.  This is part of defining message 
board on the CEDIT MESSAGE BOARD DEFINITIONS screen.  The "EF" yes/no flag 
controls whether file enclosures are allowed on a board.  If set to Y (yes), 
the users with adequate priviledges can enclose files in messages on that 
board, if set to N (no) no user, regardless of priviledge, can enclose a file 
on that board.

To upload (enclose) a file with a message, the message is first entered in the 
normal manner.  Just BEFORE saving the message, the user selects <F>ile from 
the message editor menu, and TBBS displays its protocol selection menu.  The 
user uploads the file, and TBBS returns to the message editor menu.  The user 
can enter more message text is desired, list or edit the message in the normal 
manner.  The user can see at this point a reference to the enclosed file at 
the bottom of the message text.  If the users saves the message, the message 
and its enclosed file are both written to disk.

To download an enclosed file, a user reads the message in the normal manner.  
Prior to moving to another message, they select <E>nclosure from the message 
read menu.  TBBS displays its protocol selection menu, and the user downloads 
the file as usual.  When finished, the user may re-read the message, stop 
reading, reply, or move on the next message.

                             Single File Download
                             Family Name Download

These options are much less commonly used for file transfer, as they normally 
are intended for the displaying of text on-line.  Refer to the TBBS manual for 
information on how to extend the functionality of these menu types to include 
a download option.  Type 1 is used for a single file, and Type 2 is used for 
the family name technique.

TBBS0017
Rev. 10/90

Copyright (C) 1994 eSoft, Inc., All Rights Reserved.  Permission granted
to distribute this file in its entirety, without modification, to any
interested party.  Any other use requires the written permission of
eSoft, Inc.

IMPORTANT:  The information herein is subject to change without notice.
Please call or write to confirm factual information of importance to you
or your organization.

