protected function transformFiles($files)
    {
        $result = [];

        foreach ($files as $file) {
            $result[] = [
                'type' => $file['content_type'] === 'application/directory' ? 'dir' : 'file',
                'path' => $file['name'],
                'size' => intval($file['bytes']),
                'timestamp' => strtotime($file['last_modified']),
                'mimetype' => $file['content_type'],
            ];
        }

        return $result;
    }