
                              E F S D

               The Enlightenment File System Daemon

         =================================================

              Websites that also contain info are at:

            http://www.enlightenment.org/pages/main.html
               http://www.rasterman.com/pages/e.html
              http://www.whoop.org/enlightenment.html

         =================================================


This is some preliminary documentation for EFSD. What is EFSD? It is a
file system daemon that executes file system operations asynchronously,
sending replies back to the clients which indicate the success, failure
or status of a command. The code provides both the daemon itself and
a high-level api to launch the commands contained in a library, libefsd.
See demo/demo.c for an example of how to use libefsd. The code has
examples that illustrate how to use libefsd by itself and when select()
is used to wait for things on multiple file descriptors.

The basic way of associating EFSD commands and the events the daemon
sends back to the client is via command IDs, one of which is returned
with every command launched. The replies contain the ID, the status
of the operation (success/failure) and the entire command to make
life easier. The structs you'll want to look at are in efsd/efsd.h.
The design is not unlike that of X events.

EFSD uses FAM for listing directories and the usual monitoring of files
and directories. FAM events are passed on to the client, as EFSD file-
change events, which contain the filecode as defined in fam.h, the file
name itself and the command ID that clients obtained when they started
to monitor a file.

EFSD implements (de)multiplexing of FAM events to multiple connected
clients, i.e. it keeps state on which clients ordered which files to be
monitored, using reference counting on the files to be monitored etc.
When a file is changed that is monitored by multiple clients, all of
those clients receive EFSD filechange events. Listing directory entries
via efsd_listdir() is an exception -- events generated for those commands
are sent only to the requesting client.


Requirements:
=============

* FAM, the File Alteration Monitor, available at
  http://oss.sgi.com/projects/fam. Their version has a small compilation
  problem, so if you want to be on the safe side, download the version
  on Enlightenment's SourceForge download page, which has that problem
  fixed:

  http://prdownloads.sourceforge.net/enlightenment/fam-oss-2.6.4-NULL-fix.tar.gz

* Edb, the Enlightenment database library, based on Berkeley DB.

* libxml2, from http://www.xmlsoft.org

To test Efsd:
=============

* Run ./autogen.sh, and make.
* Run make install if you want.
* Launch the daemon, use -f to keep it from forking into the
  background.
* Launch efsdsh, type "help" at the prompt.

There's still stuff to be done, check out the TODO file for that.

                              Have fun,
                              -- Christian <cK@whoop.org>.
