Added a method to modify file and directory attributes.