updated file api functions; added the send_-equivalent for puppet;  need to be tested