Added dirent API to handle files