1. A computer-implemented method for generating a data stream for backing up a directory structure in a file system of a client device, comprising: inserting, by a backup server, a begin directory object into the data stream representing beginning of data for a top level directory, wherein inserting the begin directory object into the data stream comprises: inserting a begin object header into the data stream, inserting a begin directory application specific data format (ASDF) section into the data stream after the begin object header, inserting one or more directory ASDF attribute sections into the data stream after the begin directory ASDF section, wherein the directory attribute ASDF sections include metadata describing the top level directory, and inserting a begin object trailer into the data stream after the directory ASDF attribute sections, wherein the begin object header and the begin object trailer indicate context information for the top level directory; inserting one or more child objects after the begin directory object into the data stream, wherein the one or more child objects inserted after the begin directory object represent one or more files or directories residing inside the top level directory in the file system; and inserting an end directory object into the data stream after the one or more child objects representing the end of data for the top level directory.