support for OS files and add directory support to file/attach object