Directory means a listing. You are referring to the list of names of some items.
I'm usually working with folders that actually contain files and other folders. It's often closed, so the content is not shown. A folder is a container.
Wikipedia clarifies this difference.
A telephone directory does not contain telephones.