Pergunta de entrevista da empresa Innovature

how can we convert a custom class into a file like object