				README
				------

	This module is the module that interacts with the user of the PDFS. The operations are displayed
as a menu and prompted for user's choice. The request is then process and appropriately routed to the 
other module(s). Some of the caveats in using the interface is described below.

	The user interface for the file system access is Menu driven. The 
program lists the availabe option and the user is supposed to choose an option.
Based on the option selected the program prompts for further inputs. 

	Each file in the user side is identifed by a file descriptor (fd). An 
'fd' is allocated whenever you lookup a file and all access to the files are 
done using this 'fd'. Here is a list of options available to the user.

a. Mount:
--------
	When the user mounts the file system. The user is prompted for the 
synchronisation site address. On successful mounting, the fd '0' is allocated 
for the root file handle. A storage site is also selected for serving the user.

b. Lookup:
----------
	When this option is slected, the program prompts for the 'fd' of the 
directory where you want to lookup and the name of the file you want to lookup.
On successful lookup, an 'fd' is allocated for this file and this 'fd' can be
used for further referrences.If error, appropriate error message is printed.
You can lookup only one component of a path at a time. for example, you cannot
lookup a/b in 'fd1'. You should lookup first 'a' in 'fd1' resulting in 'fd2',
then 'b' in 'fd2' resulting in 'fd3'.

c. List a Directory:
-------------------
	A directory can be listed by providing the 'fd' of the directory you
want to be listed. Current only 'ls' type of output is supported.

d. Read a File:
--------------
	When this option is selected, the user is prompted for the following
information, 'fd' of the file, the mode(read/readwrite), file pointer position,
number of bytes to be read. The read bytes will be displayed on the screen. 
No caching of the file blocks is done.

e. Write to a File:
------------------
	Same as (d) and the input is read from the user key strokes.

f. Create a File:
----------------
	Creation of a file should be propogated to all the storage sites, hence
the file handle (which has significance only in the storage site) cannot be 
used. When creating a file the user is asked for the following inputs,
	1. The directory where the file is to be created. The pathname should
	include all components from the root of the PDFS file system. 
	2. The name of the file to be created.
	3. The access permissions for the user,others,group. Unix type 
	access permissions are used. for eg. 755 specifies rwxr-xr-x.

g. Create a Directory:
----------------------
	Same as (f). 

h. Delete a File:
-----------------
	Same as (f). Except for the access permissions.

j. Delete a Directory:
----------------------
	Same as (h).

k. Rename a file/directory:
--------------------------
	When this option is selected, the user is asked for the path from and
the path to. Both the paths must be relative to the root of the PDFS file
system.

l. Details of an 'fd'.
---------------------
	The details of an fd viz, the name of the file, the fd of its parent,
the name of the preffered server if there is one, the type of the file, is all
printed for the selected 'fd'.

m. Print all 'fds':
-------------------
	When this option is selected, the details of all the open 'fds' are 
printed.

n. Close a 'fd':
---------------
	When this option is selected, the fd given as input is closed. This 
'fd' now reusable. It also unregisters with the synchronisation site for 
further callbacks for this file. Note, closing 'fd = 0' is equivalent to
unmounting the file system.

o. Exit:
-------
	When this option is selected, all the open 'fd's are closed and the 
program exits.


Note :
-----

1. All the storage sites should export the same file system but they may be 
present in different points in the local file system. The synchronisation 
server does not check for the similarity in the file system exported by the 
storage sites.  Here is an another perspective. The synchronisation site has 
to run for the life of the file system. Hence the storage sites, can all start
with empty file system when the file system comes up. The file system is built
as the users access the file system.
