单文件编译入口，与 {@link fis.compile} 不同的是，此方法内部不进行缓存判断。
@param  {File} file 文件对象
@memberOf fis.compile
@name process
@function
761619
function process(file, context) {
  fis.emit('process:start', file);
  pipe(file, 'parser');
  pipe(file, 'preprocessor');
  pipe(file, 'standard');
  postStandard(file, context);
  pipe(file, 'postprocessor');
  pipe(file, 'optimizer');
  fis.emit('process:end', file);
}
254469
function processJavaScriptFilePath(filePath: string, fileByteSize: number) {
      // If `all` was configured then we don't need to check for the Flow
      // header pragma.
      if (options.all) {
        filePaths.push(filePath);
        return;
      }
      // If we were rejected then we should not continue.
      if (rejected === true) {
        return;
      }
      // We are now waiting on this asynchronous task.
      waiting++;
      // Open the file path.
      fs.open(filePath, 'r', (error, file) => {
        if (error) {
          return reject(error);
        }
        // Get the smaller of our pragma chars constant and the file byte size.
        const bytes = Math.min(PRAGMA_BYTES, fileByteSize);
        // Create the buffer we will read to.
        const buffer = new Buffer(bytes);
        // Read a set number of bytes from the file.
        fs.read(file, buffer, 0, bytes, 0, error => {
          if (error) {
            return reject(error);
          }
          // If the buffer has the @flow pragma then add the file path to our
          // final file paths array.
          if (buffer.includes('@flow')) {
            filePaths.push(filePath);
          }
          // Close the file.
          fs.close(file, error => {
            if (error) {
              return reject(error);
            }
            // We are done with this async task
            done();
          });
        });
      });
    }
1123544
function(file, callback) {
        var number = arguments[2] || 0;
        var location = url.parse(file);
        var protocol = location.protocol === 'http:' ? http : https;
        var timeoutEventId;
        var that = this;
        var REDIRECTION_MAX = 3;

        var done = function(errors, data) {
            clearTimeout(timeoutEventId);
            callback(errors, data);
        }


        var request = protocol.request({
                method: 'GET',
                host: location.host,
                hostname: location.hostname,
                path: location.path,
                port: location.port,
                headers: this.adapter.resourceRequestHeaders(file)
            }, function(res) {

                var encoding = res.headers['content-encoding'];
                var type = res.headers['content-type'];
                var statusCode = res.statusCode;
                var errors = null;

                if (/3\d\d/.test(statusCode) && res.headers.location && number < REDIRECTION_MAX) {
                    clearTimeout(timeoutEventId);
                    var file = res.headers.location;
                    number++;
                    that.loadRemoteFile(file, callback, number);
                    return;
                } else if (!/2\d\d/.test(statusCode)) {
                    errors = new Error(res.statusMessage);
                }

                if (type.indexOf('text/') !== 0) {
                    errors = new Error('only supports `text/*` resources');
                }


                if (errors) {
                    done(errors);
                } else {

                    var buffer = new Buffer([]);


                    if (encoding === 'undefined') {
                        res.setEncoding('utf-8');
                    }


                    res.on('data', function(chunk) {
                        buffer = Buffer.concat([buffer, chunk]);
                    });

                    res.on('end', function() {

                        if (encoding === 'gzip') {

                            zlib.unzip(buffer, function(errors, buffer) {
                                if (errors) {
                                    done(errors);
                                } else {
                                    done(null, buffer);
                                }
                            });

                        } else if (encoding == 'deflate') {

                            zlib.inflate(buffer, function(errors, decoded) {
                                if (errors) {
                                    done(errors);
                                } else {
                                    done(null, decoded);
                                }
                            });

                        } else {
                            done(null, buffer);
                        }

                    });

                }

            })
            .on('error', done)
            .on('timeout', function(errors) {
                request.abort();
                done(errors);
            });


        timeoutEventId = setTimeout(function() {
            request.emit('timeout', new Error('have been timeout'));
        }, this.adapter.resourceTimeout);


        request.end();

    }
777241
public void moveThisFile(File file)
    {
        String strDestName = file.getName();
        boolean bMoveFile = true;
        String extension = this.getProperty(EXTENSION);
        String filter = this.getProperty(FILTER);
    	if (extension != null)
    	{
    		bMoveFile = false;
            int iJava = strDestName.lastIndexOf(extension);
            if (iJava != -1) if (iJava == strDestName.length() - extension.length())
            	bMoveFile = true;
    	}
    	if (filter != null)
    	{
            bMoveFile = strDestName.matches(filter);
    	}
    	if ((bMoveFile) && (this.getScanListener() != null))
    		bMoveFile = this.getScanListener().filterFile(file);
        if (bMoveFile)
        {
            String strParentSource = file.getParent();
            this.moveThisFile(file, strDestName, strParentSource);
        }
    }
523966
public void file(File file) {
        try {
            contentLength(file.length());
            file(file.getName(), new FileInputStream(file));
        } catch (FileNotFoundException e) {
            throw new PippoRuntimeException(e);
        }
    }
882267
private void processFile(Node root) {
    checkArgument(isEs6ModuleRoot(root), root);
    clearState();
    root.putBooleanProp(Node.TRANSPILED, true);
    NodeTraversal.traverse(compiler, root, this);
  }
1372115
function processFile(extension) {
  return (file, callback) => {
    let filePath;
    if (file.meta !== undefined && file.meta.filePath !== undefined) {
      const ext = extension === null
        ? file.meta.filePath.ext
        : extension;
      filePath = path.format(Object.assign({}, file.meta.filePath, { ext }));
    } else {
      filePath = extension === undefined
        ? file.path
        : `${trimExtension(file.path)}${extension}`;
    }

    async.nextTick(callback, null, Object.assign({}, file, { path: filePath }));
  };
}
951106
function (file) {
      return $.Deferred(function (deferred) {
        $.extend(new FileReader(), {
          onload: function (e) {
            var dataURL = e.target.result;
            deferred.resolve(dataURL);
          },
          onerror: function () {
            deferred.reject(this);
          }
        }).readAsDataURL(file);
      }).promise();
    }
1240717
function(file) {
            var me = this;

            // 移出invalid的文件
            $.each( me.request( 'get-files', Status.INVALID ), function() {
                me.request( 'remove-file', this );
            });

            // 如果指定了开始某个文件，则只开始指定的文件。
            if ( file ) {
                file = file.id ? file : me.request( 'get-file', file );

                if (file.getStatus() === Status.INTERRUPT) {
                    file.setStatus( Status.QUEUED );

                    $.each( me.pool, function( _, v ) {

                        // 之前暂停过。
                        if (v.file !== file) {
                            return;
                        }

                        v.transport && v.transport.send();
                        file.setStatus( Status.PROGRESS );
                    });

                    
                } else if (file.getStatus() !== Status.PROGRESS) {
                    file.setStatus( Status.QUEUED );
                }
            } else {
                $.each( me.request( 'get-files', [ Status.INITED ] ), function() {
                    this.setStatus( Status.QUEUED );
                });
            }

            if ( me.runing ) {
                me.owner.trigger('startUpload', file);// 开始上传或暂停恢复的，trigger event
                return Base.nextTick( me.__tick );
            }

            me.runing = true;
            var files = [];

            // 如果有暂停的，则续传
            file || $.each( me.pool, function( _, v ) {
                var file = v.file;

                if ( file.getStatus() === Status.INTERRUPT ) {
                    me._trigged = false;
                    files.push(file);

                    if (v.waiting) {
                        return;
                    }
                    
                    // 文件 prepare 完后，如果暂停了，这个时候只会把文件插入 pool, 而不会创建 tranport，
                    v.transport ? v.transport.send() : me._doSend(v);
                }
            });

            $.each(files, function() {
                this.setStatus( Status.PROGRESS );
            });

            file || $.each( me.request( 'get-files',
                    Status.INTERRUPT ), function() {
                this.setStatus( Status.PROGRESS );
            });

            me._trigged = false;
            Base.nextTick( me.__tick );
            me.owner.trigger('startUpload');
        }
639717
function processFile() {
  return (file, callback) => {
    let parsed;
    if (file.meta !== undefined && file.meta.layout !== undefined) {
      const ext = path.extname(file.meta.layout);
      parsed = path.parse(`${trimExtension(file.path)}${ext}`);
    } else {
      parsed = path.parse(file.path);
    }

    const filePath = {
      dir: parsed.dir,
      name: parsed.name,
      ext: parsed.ext,
    };
    const meta = Object.assign({}, file.meta, { filePath });
    async.nextTick(callback, null, Object.assign({}, file, { meta }));
  };
}
1002344
function(file) {
      var defer = new $.Deferred(),
        size = file.size,
        args = {
          url: file.source,
          dataType: 'script'
        };

      // Disables script execution when loaded upon users request.
      if ((typeof file.stopExecution === 'undefined' && stopExecution) || file.stopExecution === true)
        args.converters = {
          'text script': function(text) {
            return text;
          }
        };


      $.ajax(args).done(function(data) {

        log('File Loaded:' + file.source);

        _bytesLoaded += size;

        onElementLoaded(file, data);

        // removing the file from the array
        _files[_currentSegment].splice(0, 1);
        updatePercentage();
        defer.resolve();
      })
        .fail(function(jqxhr, settings, exception) {
          log('\n File Failed: ' + file.source +
            '\n Message:     ' + exception.message + '\n');
        });

      return defer.promise();
    }
1176098
public boolean filterFile(File file)
    {
        String strName = file.getName();
        if (strName.endsWith("~"))
            return false;
        if (strName.endsWith("#"))
            return false;
        if (strName.startsWith("#"))
            return false;
        if (strName.startsWith("."))
            return false;
        return true;    // Process this.
    }
173429
function File(file, options) {
  Item.call(this, file, options);
  this.initFile(file);
  return file;
}
573965
async function read(file, cache) {

  const stats = fs.statSync(file)

  if (stats.isDirectory()) {
    const files = fs.readdirSync(file)
    files.map(k => read(path.join(file, k), cache))
  // 排除掉文件中的 dotfile
  } else if (stats.isFile() && !path.basename(file).startsWith('.')) {
    if (!cache.get(file)) cache.set(file, stats)
  }
  return cache
}
396629
function writeFile(file, content) {
    fs.writeFileSync(file, content);
    files.push(path.relative(app.components.get('path'), file));
}
1076968
function(file) {
        var self = this;

        return new Promise(function(resolve) {
            fs.readFileAsync(file, 'utf-8')
                .then(function(content) {
                    return self._parseFile(file, content);
                })
                .then(function(ast) {
                    return self._getConfig(file, ast);
                })
                .then(function(config) {
                    self._modules = self._modules.concat(config);

                    resolve(config);
                });
        });
    }
579307
function (file) {
    this.src = file.src || {};
    if (this.path) {
      this.src.path = this.path;
    }
    if (Buffer.isBuffer(this.contents)) {
      this.content = this.contents.toString();
    }
    if (this.content) {
      this.options.orig = this.content;
    }

    // ensure that `file` has `path` and `content` properties
    this.validate(file);

    this.options.orig = file.content;
    this.options.plural = this.collection.options.plural;
    this.options.handled = this.options.handled = [];

    this.src = file.src || {};
    this.src.path = this.src.path || this.path;

    // add non-emumerable properties
    this.defineOption('route', this.options.route);
    this.define('_callbacks', this._callbacks);
    file.__proto__ = this;
    file.path = this.path;

    // handle `onLoad` middleware routes
    this.app.handle('onLoad', file);
  }