Patent ID: 7634514

Claim:
In a computing environment, a computer-implemented method for synchronization of file system directories, the method comprising: enumerating differences between the directory structures of a first directory and a second directory, the enumerating comprising parallel operation of multiple threads, and the enumeration comprising a thread opening a path under both the first directory and the second directory and enumerating all the children of each directory; for each new directory discovered during an enumeration, enqueuing the new directory for enumeration in a separate thread; creating a plurality of sync items, each sync item comprising a plurality of fields representing a sync description representing an original state of a file or directory, a state in the first directory, a state in the second directory, a change time indicating when a change occurred from an original state in one directory, the other directory, or both, and an error code, and each sync item corresponding to a file or directory in either the first directory or the second directory; building a synchronization tree structure comprising a subset of a directory namespace which includes each of the files and directories of the first directory and the second directory, comprising the enumerated differences between the first and second directories, comprising a node for each file which has changed between the first directory and the second directory, comprising a node for each directory which has changed between the first directory and the second directory, comprising a simple node for each directory which is not itself changed but which contains a file or directory which has changed between the first and second directories, and comprising a sync item corresponding to each node which is not a simple node; returning the enumerated differences between the first and second directories to a client caller for analysis; receiving one or more operation requests from a caller; packaging an operation, an item pointer, and context information into an internal context block; queuing the context block as a work item in a queue for a process thread pool to handle; ensuring that queuing actions are handled in the proper order; extracting an item from the queue; when the item is associated with a file, verifying that the file is in the same state as it was during enumeration; and performing an operation to synchronize the directories in response to the operation requests.