/http on
u66. If you like to learn by doing, log into a webfs machine and try
the following commands:
- cd /http
- ls
- cd now.cs.berkeley.edu
- ls
- /usr/now/bin/webfs_expand
- ls
- cd Glunix
- ls
- cat glunix.html
- cd ..
- ls
- cd Images
- ls
- xv now0.jpg
The above sequence of operations will provide a feel for basic WebFS operation. There are some semantic differences between WebFS and standard UNIX file operation. The next section details these differences.
Initially the contents of the directory will be empty. Entries are
made "on the fly" as users attempt access to various web sites. For
example, though the /http directory will initially be
empty, users will be able to execute the command:
cd now.cs.berkeley.edu
Webfs will check to ensure that an http server is running on that
machine and create that directory. From this point on, all users will
be able to see the directory now.cs.berkeley.edu in the
webfs hierarchy.
A notable aspect of the system is the nature of directory contents.
Because of the limitations of HTTP, webfs cannot ascertain the
contents of directories which contain a file called
index.html. For example, doing an ls in the
above now.cs.berkeley.edu directory will return a single
entry, index.html. The existence of other directories
can be inferred by looking at the index.html file (which makes
reference to directories such as Glunix, Xfs, etc.), or by prior
knowledge. If a user attempts a command of the form cd
Glunix, the operation will check to see if such a directory
exists, and create an entry on the fly.
To provide a workaround to the above, we provide a utility program
webfs_expand (located in /usr/now/bin). This
program takes a filename as an argument (defaults to index.html if no
filename is provided) and parses the file, creating entries for all
local directories referenced by that file. If webfs_expand is
run on index.html in
/http/now.cs.berkeley.edu, then entries for directories
such as Glunix, Xfs, AM, WebOS, etc. would be created.
Back to the WebOS Home Page.