ADD: Handling Directory API, UPDATE: file api