# File lib/hammer_cli_import/configfile.rb, line 172
      def file_data(data)
        # Everybody gets a name, which is 'path' with '/' chgd to '_'
        data['name'] = data['path'].gsub('/', '_')

        # If we're not type='file', done - return data
        return data unless data['file_type'] == 'file'

        # If we're not a binary-file, check for macros
        if data['is_binary'] == 'N'
          sdelim = data['delim_start']
          edelim = data['delim_end']
          cstr = data['contents']
          matched = false
          data['contents'] = cstr.gsub(/(#{Regexp.escape(sdelim)})(.*)(#{Regexp.escape(edelim)})/) do |_match|
            matched = true
            "<%= #{map_macro Regexp.last_match[2].strip!} %>"
          end if cstr
          # If we replaced any macros, we're now type='template'
          data['file_type'] = 'template' if matched
        else
          # If we're binary, base64-decode contents
          debug 'decoding'
          data['contents'] = data['contents'].unpack('m')
        end

        return data
      end