EspoCRM provides an ability to store documents.
While composing an email, there is the ability to add a certain document as an attachment.
Folders allow to group documents. Document Folders are presented as a hierarchical tree structure. Each folder can contain sub-folders.
Document Folder is a separate entity type, hence an access can be controlled by ACL.
To be able to search documents in all sub-folders you need to switch to the expanded mode in the context menu next to the root folder.