Described is a system and method that synchronizes cached files and
directories with a server's files and directories via a layered
architecture, by collapsing state information into an index into a fixed
set of known states, and looking up the action that synchronizes that
state. The actions are then taken to synchronize the content. Any of
fifty possible synchronization states are thus handled. A synchronization
controller requests a subsystem to evaluate a local cache and remote file
system to generate state flags for each item considered for
synchronization. The synchronization controller processes the state
information to identify a selected table from among a plurality of tables
that contain the fifty values, and uses other flags to compute an index
into the table. The selected table contains values that index into an
action table containing actions that specify an operation set that is
requested to synchronize the particular state scenario.