[AD] Some more features for platform-independent file system?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Following a couple of ideas on the development board on allegro.cc 
(probably http://www.allegro.cc/forums/view_thread.php?_id=176192 ), I 
propose we add the following features to our file functions:

 - on DOS, the directory '/' doesn't refer to the root directory of the 
   current drive, but refers to a 'virtual' directory which has one     
   subdirectory for each valid drive. So, for a system with 2 dos       
   partitions and a CDROM, the root directory would look like:

   /
    c/        [refers to first dos partition]
    d/        [refers to second dos partition]
    e/        [refers to CDROM]

   So to access c:\djgpp\file, you would use the name /c/djgpp/file .
   Of course, the dos-style name will also be accepted.

 - The directory ~/ is expanded to the user's home directory on         
   platforms where that concept exists, or the executable's actual
   directory otherwise. This lets us store configuration files somewhere
   sensible.

 - (Maybe) On dos systems, a preceding full stop on a file name is
   skipped (so ~/.allegrorc would refer to that file on UNIX, but to
   a file called 'allegrorc' (or truncation thereof) in the executable's
   actual directory on dos). This lets us use sensible names for
   config files on platforms which support it, but also handles dos
   without any platform-specific code.

Bye for now,
- -- 
Laurence Withers, lwithers@xxxxxxxxxx
                 http://www.lwithers.demon.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8qiAVZutPpDHGwY0RAjp3AJwKkBhdLcqCI7OaPKxaJzEyksQDcwCgjdbq
0FA3rr4+/deJ2OjMEo7MWBc=
=YJiN
-----END PGP SIGNATURE-----



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/