The present invention relates to a fine-
granularity files and
directory edition management method based on snapshots, belonging to the multi-version document
system field. The present invention separates a
name space consisting of files and dirnames in a whole
file system from an edition space representing the generating periods of different editions, and adopts relatively independent strategies to execute management, forming a hierarchical two-dimensional structure, i.e. forming a hierarchical structure from a
root directory to a file in the
name space; in the edition space, the editions of files and
directory are organized through an index structure chronologically, forming a hierarchical structure in the edition space. The retrieval of the
name space adopts an index strategy based on dynamic hash. The retrieval of the edition space adopts an index strategy based on a red-black tree. The
directory edition and file edition respectively adopt a red-black
tree structure variant aiming at the respective characteristics. The present invention can greatly improve the
usability and the performance of the
system, and controls the amount of consumption of time and space resulting from the maintenance of historical editions in an acceptable scope.