It depends largely on what operations you want to be able to efficiently support. Your current approach will make it easy to list all files within a directory and all descendants of a directory.
On the other hand moving files from one directory to another is more painful because there is no atomic modifier that allows you to modify a substring of a field. Instead, you'll have to pull down all of the file entries, modify them, then push them back as updates. (Someone correct me if I'm wrong about this)
With this structure it is also relatively difficult to list out the directory structure for traversal. The only way to know every folder is to load every file path and then parse them to see if they contain a new folder.
Does any of this matter? Maybe not, depends completely on what you are trying to do.
As another possible method, do you really want to represent one hierarchy? Or do you get a better representation have many smaller hierarchies? If the second, then you may get better results storing each hierarchy as a complete document, representing folder structure with the nesting of documents or via parent-child references.