If we find an resource id wich is a file and not in the export yet, then we
export is aswell. It's a link towards "something else".
175988
private function setPlaceHolder($file, &$_data, &$_files)
    {
        //urls to be matched...
        //'/file/resource/media/([^']+)#'
        //'/resource/open/([^/]+)/([^']+)'
        $text = file_get_contents($file);
        $baseUrl = $this->router->getContext()->getBaseUrl();

        //first regex
        $regex = '#' . $baseUrl . '/file/resource/media/([^\'"]+)#';

        preg_match_all($regex, $text, $matches, PREG_SET_ORDER);

        if (count($matches) > 0) {
            foreach ($matches as $match) {

                if (!$this->getItemFromUid($match[1], $_data)) {
                    $this->createDataFolder($_data);
                    $node = $this->resourceManager->getNode($match[1]);

                    if ($node && $node->getResourceType()->getName() === 'file') {
                        $el = $this->getImporterByName('resource_manager')->getResourceElement(
                            $node,
                            $node->getWorkspace(),
                            $_files,
                            $_data,
                            true
                        );
                        $el['item']['parent'] = 'data_folder';
                        $el['item']['roles'] = array(array('role' => array(
                            'name'   => 'ROLE_USER',
                            'rights' => $this->maskManager->decodeMask(7, $this->resourceManager->getResourceTypeByName('file'))
                        )));
                        $_data['data']['items'][] = $el;
                    }
                }

                $text = $this->replaceLink($text, $match[0], $match[1], $_data);
            }
        }

        //second regex
        $regex = '#' . $baseUrl . '/resource/open/([^/]+)/([^\'"]+)#';
        preg_match_all($regex, $text, $matches, PREG_SET_ORDER);

        if (count($matches) > 0) {
            foreach ($matches as $match) {
                $text = $this->replaceLink($text, $match[0], $match[2]);
            }
        }

        $event = $this->eventDispatcher->dispatch('rich_text_format_event_export', 'RichTextFormat', array($text, $_data, $_files));
        $text = $event->getText();

        return $text;
    }
198018
private void getImportResource() throws CmsVfsException {

        // get the import resource
        m_importResource = new File(m_importFolderName);
        // check if this is a folder or a ZIP file
        if (m_importResource.isFile()) {
            try {
                m_zipStreamIn = new ZipInputStream(new FileInputStream(m_importResource));
            } catch (IOException e) {
                // if file but no ZIP file throw an exception
                throw new CmsVfsException(
                    Messages.get().container(Messages.ERR_NO_ZIPFILE_1, m_importResource.getName()),
                    e);
            }
        }
    }
1222437
private boolean isStale() {
    long lastRun = outputFile.lastModified();
    long sourcesLastModified = Math.max(
        getLastModifiedTime(this.sourceFileLists),
        getLastModifiedTime(this.sourcePaths));
    long externsLastModified = getLastModifiedTime(this.externFileLists);

    return lastRun <= sourcesLastModified || lastRun <= externsLastModified;
  }
723576
def find_by_id(self, organization_export, params={}, **options): 
        
        path = "/organization_exports/%s" % (organization_export)
        return self.client.get(path, params, **options)
1167505
function findSourceFile(fileName, path, isDefaultLib, isReference, refFile, refPos, refEnd) {
            if (filesByName.contains(path)) {
                var file_1 = filesByName.get(path);
                // try to check if we've already seen this file but with a different casing in path
                // NOTE: this only makes sense for case-insensitive file systems
                if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) {
                    reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd);
                }
                // If the file was previously found via a node_modules search, but is now being processed as a root file,
                // then everything it sucks in may also be marked incorrectly, and needs to be checked again.
                if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) {
                    sourceFilesFoundSearchingNodeModules[file_1.path] = false;
                    if (!options.noResolve) {
                        processReferencedFiles(file_1, ts.getDirectoryPath(fileName), isDefaultLib);
                        processTypeReferenceDirectives(file_1);
                    }
                    modulesWithElidedImports[file_1.path] = false;
                    processImportedModules(file_1, ts.getDirectoryPath(fileName));
                }
                else if (file_1 && modulesWithElidedImports[file_1.path]) {
                    if (currentNodeModulesDepth < maxNodeModulesJsDepth) {
                        modulesWithElidedImports[file_1.path] = false;
                        processImportedModules(file_1, ts.getDirectoryPath(fileName));
                    }
                }
                return file_1;
            }
            // We haven't looked for this file, do so now and cache result
            var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) {
                if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
                    fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage));
                }
                else {
                    fileProcessingDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage));
                }
            });
            filesByName.set(path, file);
            if (file) {
                sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0);
                file.path = path;
                if (host.useCaseSensitiveFileNames()) {
                    // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case
                    var existingFile = filesByNameIgnoreCase.get(path);
                    if (existingFile) {
                        reportFileNamesDifferOnlyInCasingError(fileName, existingFile.fileName, refFile, refPos, refEnd);
                    }
                    else {
                        filesByNameIgnoreCase.set(path, file);
                    }
                }
                skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib;
                var basePath = ts.getDirectoryPath(fileName);
                if (!options.noResolve) {
                    processReferencedFiles(file, basePath, isDefaultLib);
                    processTypeReferenceDirectives(file);
                }
                // always process imported modules to record module name resolutions
                processImportedModules(file, basePath);
                if (isDefaultLib) {
                    files.unshift(file);
                }
                else {
                    files.push(file);
                }
            }
            return file;
        }
163275
protected void writeResource(String resourceName, String exportpoint, byte[] content) {

        File file = getExportPointFile(resourceName, exportpoint);
        writeResource(file, content);
    }
1208125
private static boolean isLink(Object data) {
    try {
      final Map<String, Object> map = (Map<String, Object>) data;
      final Map<String, Object> sys = (Map<String, Object>) map.get("sys");
      final String type = (String) sys.get("type");
      final String linkType = (String) sys.get("linkType");
      final String id = (String) sys.get("id");

      if ("Link".equals(type)
          && ("Entry".equals(linkType) || "Asset".equals(linkType)
          && id != null)) {
        return true;
      }
    } catch (ClassCastException cast) {
      return false;
    }
    return false;
  }
611281
function getImportResult(extractions, url, prev, includedFilesMap, includedPaths) {
  const absolutePath = getImportAbsolutePath(url, prev, includedFilesMap, includedPaths);
  const contents = extractions[absolutePath].injectedData;

  return { file: absolutePath, contents };
}
491542
protected void doExport() {
        // Get archive
        final Archive<?> archive = getArchive();
        if (log.isLoggable(Level.FINE)) {
            log.fine("Exporting archive - " + archive.getName());
        }

        // Obtain the root
        final Node rootNode = archive.get(ArchivePaths.root());

        // Recursively process the root children
        for (Node child : rootNode.getChildren()) {
            processNode(child);
        }
    }
1036708
public static boolean isJavaArchive(IResource resource) {
        if (resource == null || (resource.getType() != IResource.FILE)) {
            return false;
        }
        String name = resource.getName();
        return Archive.isArchiveFileName(name);
    }
711665
private function processingSourceFiles(): void
  {
    $this->logVerbose('Replace references to resource files with references to optimized/minimized resource files.');

    foreach ($this->sourceFilesInfo as $source_filename)
    {
      $this->logVerbose("Processing %s.", $source_filename);

      $content = file_get_contents($source_filename);
      if ($content===false) $this->logError("Unable to read file '%s'.", $source_filename);

      $new_content = $content;

      if (strncmp($content, '<?php', 5)===0)
      {
        // Source is a PHP file.
        $new_content = $this->processPhpSourceFile($source_filename, $new_content);
      }

      $new_content = strtr($new_content, $this->replacePairs);

      if ($content!=$new_content)
      {
        $time = null;

        // If required determine the latest modification time of the source file and its referenced resource files.
        if ($this->preserveModificationTime)
        {
          $time = $this->getMaxModificationTime($source_filename, $new_content);
        }

        // Write sources file with modified references to resource files.
        $status = file_put_contents($source_filename, $new_content);
        if ($status===false) $this->logError("Updating file '%s' failed.", $source_filename);
        $this->logInfo("Updated file '%s'.", $source_filename);

        // If required set the mtime to the latest modification time of the source file and its referenced resource
        // files.
        if ($this->preserveModificationTime)
        {
          $status = touch($source_filename, $time);
          if ($status===false) $this->logError("Unable to set mtime for file '%s'.", $source_filename);
        }
      }
    }
  }
774902
@Override
    public ExternalPortletType exportData(String id) {
        IPortletType portletType = this.portletTypeRegistry.getPortletType(Integer.parseInt(id));
        if (null == portletType) {
            return null;
        }

        return convert(portletType);
    }
1151818
private void updateExportParams() {

        m_exportParams.setExportAccountData(m_includeAccount.getValue().booleanValue());
        m_exportParams.setExportAsFiles(m_asFiles.getValue().booleanValue());
        m_exportParams.setExportProjectData(m_includeProject.getValue().booleanValue());
        m_exportParams.setExportResourceData(m_includeResource.getValue().booleanValue());
        m_exportParams.setInProject(m_modified.getValue().booleanValue());
        m_exportParams.setIncludeSystemFolder(m_includeSystem.getValue().booleanValue());
        m_exportParams.setIncludeUnchangedResources(m_includeUnchanged.getValue().booleanValue());
        String exportFileName = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(
            OpenCms.getSystemInfo().getPackagesRfsPath() + File.separator + (String)m_target.getValue());
        m_exportParams.setPath(exportFileName);
        m_exportParams.setRecursive(m_recursive.getValue().booleanValue());
        m_exportParams.setResources(getResources());
        if (m_changedSince.getValue() != null) {
            m_exportParams.setContentAge(m_changedSince.getDate().getTime());
        } else {
            m_exportParams.setContentAge(0);
        }
    }
1141270
private void doExportToWave()
	{
		doStopPlaying();
		
		if (currentContainer==null)
	    {
	    	JOptionPane.showMessageDialog(this, "You need to load a file first!", "Ups!", JOptionPane.ERROR_MESSAGE);
	    }
	    else
	    {
	    	do
		    {
				String fileName = Helpers.createLocalFileStringFromURL(currentContainer.getFileURL(), true);
				fileName = fileName.substring(fileName.lastIndexOf(File.separatorChar)+1);
				String exportToWav = exportPath + File.separatorChar + fileName + ".WAV";
				FileChooserResult selectedFile = Helpers.selectFileNameFor(this, exportToWav, "Export to wave", fileFilterExport, 1, false, false);
				if (selectedFile!=null)
				{
					File f = selectedFile.getSelectedFile();
				    if (f!=null)
				    {
				    	if (f.exists())
				    	{
				    		int result = JOptionPane.showConfirmDialog(this, "File already exists! Overwrite?", "Overwrite confirmation", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
				    		if (result==JOptionPane.CANCEL_OPTION) return;
				    		if (result==JOptionPane.NO_OPTION) continue; // Reselect
				    		boolean ok = f.delete();
				    		if (!ok)
				    		{
		        		    	JOptionPane.showMessageDialog(MainForm.this, "Overwrite failed. Is file write protected or in use?", "Failed", JOptionPane.ERROR_MESSAGE);
		        		    	return;
				    		}
				    	}
				    	// get Export Type from selected filechooser index (find the index ;) )
				    	String modFileName = f.getAbsolutePath();
				    	int i = modFileName.lastIndexOf(File.separatorChar);
				    	exportPath = modFileName.substring(0, i);
			    		int result = JOptionPane.showConfirmDialog(this, "Continue playback while exporting?", "Playback?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);

			    		Mixer mixer = createNewMixer();
				    	mixer.setPlayDuringExport(result==JOptionPane.YES_OPTION);
				    	mixer.setExportFile(f);
				    	playerThread = new PlayThread(mixer, this);
				    	playerThread.start();
			    		
				    	inExportMode = true; // Signal, that we are exporting right now...
				    }
				}
		    	return;
		    }
		    while (true);
	    }
	}
325068
def showExports(peInstance):
    
    exports = peInstance.ntHeaders.optionalHeader.dataDirectory[consts.EXPORT_DIRECTORY].info
    if exports:
        exp_fields = exports.getFields()

        for field in exp_fields:
            print "%s -> %x" % (field,  exp_fields[field].value)
        
        for entry in exports.exportTable:
            entry_fields = entry.getFields()
            for field in entry_fields:
                print "%s -> %r" % (field,  entry_fields[field].value)    
    else:
        print "The file does not have exported functions."
1158613
public boolean isExportingCSV()
    {
        Boolean export = getOptionValue(ExportCSVOption.NAME);
        return export == null ? false : export;
    }
368637
private void writeResources()
   {
      for (Resource resource : m_projectFile.getResources())
      {
         if (resource.getUniqueID().intValue() != 0)
         {
            writeResource(resource);
         }
      }
   }