unc_fsx: DJGPP File-System Extension for handling UNC filenames

unc_fsx is Copyright 1998, 1999 by Richard Dawe.

unc_fsx is distributed under the terms of the GNU Library General Public License (GNU LGPL). Please read license.txt before using unc_fsx.

[Introduction] [How To Use It] [Download] [Todo] [Credits]


unc_fsx is a library that allows DJGPP programs to handle UNC-style filenames transparently. UNC is Universal Naming Convention, a not-particularly universal naming convention that is used on Windows (SMB) networks. The convention is as follows for disk shares:


e.g. \\myhost\myshare\mydir\mydir2\myfile.txt could be a text file on your computer.

When using unc_fsx, any file open operations will be intercepted via an FSEXT or File-System Extension. The FSEXT checks the filename to see if it fits the UNC disk share format. If so, it checks to see if the share is mapped. If not, then it maps it to a drive letter (starting with Z:, in reverse alphabetical order). The FSEXT then modifies the filename to use the mapped drive letter, so that all the file functions work.

Note: The filename modification is direct, so if you wish to display the UNC name then you should perform all file operations with a copy of the filename. This is a bit of a hack, but I hope to fix this sometime.


How To Use It

  1. Compile the library using "make lib".
  2. Add the following declaration to your program: "int unc_fsext_init (void);"
  3. At some point during the start-up code of your program, call unc_fsext_init(). This installs the File-System Extension that handles UNC filenames.
  4. Link the library into your program, e.g. using the following gcc switches: "-Lc:/djgpp/contrib/uncfsx01/lib/ -lunc".



unc_fsx Version 0.1 - 15th March 1998
Source distribution (22K) uncfsx01.zip






This document was written by Richard Dawe. His home page can be found at http://www.bigfoot.com/~richdawe/ and his e-mail address is richdawe@bigfoot.com.