Changes to directory functions