Update file and dir APIs.