Set the project files from the Project API.
 Implementation example:

   configuration = WebTranslateIt::Configuration.new
   files = configuration.files # returns an array of TranslationFile
340486
def set_files(project)
      self.files = []
      project['project_files'].each do |project_file|
        if project_file['name'].nil? or project_file['name'].strip == ''
          puts "File #{project_file['id']} not set up"
        else
          self.files.push TranslationFile.new(project_file['id'], project_file['name'], project_file['locale_code'], self.api_key, project_file['updated_at'], project_file['hash_file'], project_file['master_project_file_id'])
        end
      end
    end
701825
def from_project_file(controller, project_file, track_path=None, log_level=logging.ERROR):
        """"""
        rocket = Rocket(controller, track_path=track_path, log_level=log_level)
        rocket.connector = ProjectFileConnector(project_file,
                                                controller=controller,
                                                tracks=rocket.tracks)
        return rocket
414019
def configure_module_files
      source = "#{@target_dir}/app/apis/#{@project_name}/modules/#{@module_name}_apis.rb"
      application_module = @project_name.split('_').map(&:capitalize)*''
      file = File.read(source)
      replace = file.gsub(/module Rammer/, "module #{application_module}")
      File.open(source, "w"){|f|
        f.puts replace
      }
    end
825097
def _ewp_files_set(self, ewp_dic, project_dic):
        
        # empty any files in the template which are not grouped
        try:
            ewp_dic['project']['file'] = []
        except KeyError:
            pass
        # empty groups
        ewp_dic['project']['group'] = []
        i = 0
        for group_name, files in project_dic['groups'].items():
            ewp_dic['project']['group'].append({'name': group_name, 'file': []})
            for file in files:
                ewp_dic['project']['group'][i]['file'].append({'name': file})
            ewp_dic['project']['group'][i]['file'] = sorted(ewp_dic['project']['group'][i]['file'], key=lambda x: os.path.basename(x['name'].lower()))
            i += 1
175431
def list_files(self, project):
        
        path = "/projects/{}/files".format(project.id)
        res = yield from self.http_query("GET", path, timeout=120)
        return res.json
491076
protected void setFileFilter()
   {
      String[] extensions = m_model.getExtensions();
      for (String extension : extensions)
      {
         m_fileChooser.setFileFilter(new FileNameExtensionFilter(extension.toUpperCase() + " Files", extension));
      }
      m_fileChooser.setFileFilter(new FileNameExtensionFilter("Project Files", m_model.getExtensions()));
   }
258
def segment_pofiles(configuration, locale):
    
    files_written = set()
    for filename, segments in configuration.segment.items():
        filename = configuration.get_messages_dir(locale) / filename
        files_written.update(segment_pofile(filename, segments))
    return files_written
787506
public Mail setFiles(File... files) {
		DataSource[] attachments = new DataSource[files.length];
		for (int i = 0; i < files.length; i++) {
			attachments[i] = new FileDataSource(files[i]);
		}
		return setAttachments(attachments);
	}
372560
def _init_update_po_files(self, domains):
        """"""
        for language in settings.TRANSLATIONS:
            for domain, options in domains.items():
                if language == options['default']: continue  # Default language of the domain doesn't need translations
                if os.path.isfile(_po_path(language, domain)):
                    # If the translation already exists, update it, keeping the parts already translated
                    self._update_po_file(language, domain, options['pot'])
                else:
                    # The translation doesn't exist, create a new translation file
                    self._init_po_file(language, domain, options['pot'])
1037844
def populate_files_from_whole_templates
        @whole_templates.each {|x| FileUtils.cp(FileUtils.join_paths(@template_path, x), FileUtils.join_paths(@install_path, @project_name, x)) } unless @whole_templates.nil?
      end
1260242
public void addFileTranslation(String translation) {

        m_fileTranslations.add(translation);
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_ADD_FILE_TRANSLATION_1, translation));
        }
    }
771730
function (request, response) {
      var locale = request.params.locale;
      var sendFile = response.sendFile || response.sendfile;
      sendFile.apply(response, [path.join(configuration.directory, locale + configuration.extension)]);
    }
1059828
def copy_files
      files_to_copy.each do |origin, destination|
        template(origin, destination, force: true)
      end
    end
287564
def put(self):
        
        params = dict(
            title=self.title or '',
            description=self.description or '',
            document_ids=[str(i.id) for i in self.document_list]
        )
        self._connection.put('projects/%s.json' % self.id, params)
318699
def copy_config(project_path, output_dir):
    
    project_config = os.path.join(project_path, 'config.json')
    saved_config = os.path.join(output_dir, 'config.json')
    shutil.copy(project_config, saved_config)
41254
def pretty_path_from_project(of_file)
      Pathname.new(of_file.unicode_normalize).relative_path_from(Pathname.new(project_path)).to_s
    end
910502
def new_files
      files = Set.new
      site.each_site_file { |item| files << item.destination(site.dest) }
      files
    end