Process a single file.
774929
function processFile() {
  const options = {};
  return (file, callback) => {
    const data = csso.minify(file.data, options).css;
    async.nextTick(callback, null, Object.assign({}, file, { data }));
  };
}
475730
def _process(compressor, input_filename, output_filename):
    
    compressor(input_filename, output_filename)
    result_size = os.path.getsize(output_filename)

    return _CompressorResult(result_size, output_filename, compressor.__name__)
791641
def fromfile(cls, f):
        """"""
        filter = cls()
        filter._setup(*unpack(cls.FILE_FMT, f.read(calcsize(cls.FILE_FMT))))
        nfilters, = unpack(b'<l', f.read(calcsize(b'<l')))
        if nfilters > 0:
            header_fmt = b'<' + b'Q'*nfilters
            bytes = f.read(calcsize(header_fmt))
            filter_lengths = unpack(header_fmt, bytes)
            for fl in filter_lengths:
                filter.filters.append(BloomFilter.fromfile(f, fl))
        else:
            filter.filters = []

        return filter
1155678
def process_data(self, file_info):
        """"""
        if self._exceeds_max_file_size(file_info):
            self.log.info("File '%s' has a size in bytes (%d) greater than the configured limit. Will be ignored.",
                          file_info.path, file_info.size)
            self.fire(events.FilteredFile(file_info))
            return None
        else:
            return file_info
50550
def process_files(report)
      files.each do |file|
        process_file(file, report)
        break if report.failed? && fail_fast?
      end
    end
1260515
def process(process)
      parse_files.each do |file|
        begin
          puts file if @options['debug']
          @runner.send(process, file, File.read(file))
        rescue StandardError
          if @options['debug']
            warning = "#{file} looks like it's not a valid Ruby file.  Skipping..."
            plain_output(warning, 'red')
          end
        end
        @bar.increment if display_bar?
      end
      @runner.send("after_#{process}")
    end
1053909
private void processFiles(File[] files) {
        phaseOutput(format("=== %s ===", getApplicationName()));
        phaseOutput(format("Compiling %d BEL Document(s)", files.length));

        boolean pedantic = withPedantic();
        boolean verbose = withVerbose();

        int validated = 0;

        for (int i = 1; i <= files.length; i++) {
            File file = files[i - 1];

            if (verbose) {
                phaseOutput("Compiling " + i + " of " + files.length
                        + " BEL Document(s)");
            }

            // validate document
            Document document = stage1(file);
            if (document == null) {
                if (pedantic) {
                    bail(VALIDATION_FAILURE);
                }
                continue;
            }
            validated++;

            // run stages 2 - 7
            runCommonStages(pedantic, document);
        }

        if (validated == 0) {
            bail(NO_VALID_DOCUMENTS);
        }
    }
728055
public boolean processClassFile(String fileName) {
        Path path = Paths.get(fileName);
        try {
            ClassFile cf = ClassFile.read(path);
            processClass(cf);
            return true;
        } catch (NoSuchFileException nsfe) {
            errorNoFile(fileName);
        } catch (IOException | ConstantPoolException ex) {
            errorException(ex);
        }
        return false;
    }
672468
function (file) {
        var self = this,
            ext = path.extname(file.name).toLowerCase();
        return this.isZip(ext) ? self.processZip(file) : self.processFile(file, ext);
    }
603370
def read_file(file, filename='<input>'):
    """"""
    reader = Reader(filename)
    for line in file:
        yield from reader.feed_line(line)
    reader.finish()
1312035
def fromfile(file, dtype, count, *args, **kwargs):
    """"""

    try:
        return np.fromfile(file, dtype=dtype, count=count, *args, **kwargs)
    except (TypeError, IOError, UnsupportedOperation):
        return np.frombuffer(
            file.read(count * np.dtype(dtype).itemsize),
            dtype=dtype, count=count, *args, **kwargs)
882267
private void processFile(Node root) {
    checkArgument(isEs6ModuleRoot(root), root);
    clearState();
    root.putBooleanProp(Node.TRANSPILED, true);
    NodeTraversal.traverse(compiler, root, this);
  }
372371
protected function _processFiles()
    {
        if (isset($_FILES['myfile']['name'])) {
            // process all files
            foreach ($_FILES['myfile']['name'] as $key => $value) {
                $aSource = $_FILES['myfile']['tmp_name'];
                $sSource = $aSource[$key];
                $value = strtolower($value);
                // add type to name
                $aFilename = explode(".", $value);

                //hack?

                $aBadFiles = ["php", 'php4', 'php5', "jsp", "cgi", "cmf", "exe"];

                if (in_array($aFilename[1], $aBadFiles)) {
                    \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("File didn't pass our allowed files filter.");
                }

                //reading SQL dump file
                if (filesize($sSource) > 0) {
                    $rHandle = fopen($sSource, "r");
                    $sContents = fread($rHandle, filesize($sSource));
                    fclose($rHandle);

                    //reading only one SQL dump file
                    return $sContents;
                }

                return;
            }
        }

        return;
    }
564650
public static void processFile(String infile, String outfile,String delimer,int tagnum) throws IOException {
		BufferedReader in = new BufferedReader(new UnicodeReader(new FileInputStream(infile), "utf8"));
		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(
				outfile), "utf8"));
		String line = null;
		while ((line = in.readLine()) != null) {
			line = line.trim();
			String newline;			
			newline= genSegSequence(line,delimer,tagnum);
			out.write(newline);
			//			out.newLine();
		}
		in.close();
		out.close();

	}
1237404
def process_file(self, path, dryrun):
        
        if dryrun:
            return path

        # get file's current header
        with open(path, "r") as infile:
            head = infile.read(len(self.__header))

        # normalize line breaks
        if self.__normalize_br:
            head = head.replace("\r\n", "\n")

        # already contain header? skip
        if head == self.__header:
            return path

        # add header to file
        self.push_header(path)

        # return processed file
        return path
1231767
public void process() {
    if (src == null && dest == null) {
      throw new IllegalArgumentException("Source and destination shouldn't be null together");
    }

    File destinationFile = null;
    try {
      destinationFile = getDestinationFile();
      ZipOutputStream out = null;
      ZipEntryOrInfoAdapter zipEntryAdapter = null;

      if (destinationFile.isFile()) {
        out = ZipFileUtil.createZipOutputStream(new BufferedOutputStream(new FileOutputStream(destinationFile)), charset);
        zipEntryAdapter = new ZipEntryOrInfoAdapter(new CopyingCallback(transformers, out, preserveTimestamps), null);
      }
      else { // directory
        zipEntryAdapter = new ZipEntryOrInfoAdapter(new UnpackingCallback(transformers, destinationFile), null);
      }
      try {
        processAllEntries(zipEntryAdapter);
      }
      finally {
        IOUtils.closeQuietly(out);
      }
        handleInPlaceActions(destinationFile);
    }
    catch (IOException e) {
      ZipExceptionUtil.rethrow(e);
    }
    finally {
      if (isInPlace()) {
        // destinationZip is a temporary file
        FileUtils.deleteQuietly(destinationFile);
      }
    }
  }
215680
function processAsBuffer( file ) {
	return function( callback ) {
		var json = JSON.parse(file.contents);
		callback( json, path.dirname(file.path) );
	}
}