[File Support] Refactored to comply with the new generated API.