在队列中删除文件。
@grammar removeFile( file ) => Array
@method removeFile
@param {File} 文件对象。
323672
function( file ) {
                var me = this,
                    existing = this._map[ file.id ];
    
                if ( existing ) {
                    delete this._map[ file.id ];
                    file.destroy();
                    this.stats.numofDeleted++;
                }
            }
1267244
private void resetFile(String file) {
    File f = new File(file);
    if (f.exists()) {
      JMetalLogger.logger.info("Already existing file " + file);

      if (f.isDirectory()) {
        JMetalLogger.logger.info("Deleting directory " + file);
        if (f.delete()) {
          JMetalLogger.logger.info("Directory successfully deleted.");
        } else {
          JMetalLogger.logger.info("Error deleting directory.");
        }
      } else {
        JMetalLogger.logger.info("Deleting file " + file);
        if (f.delete()) {
          JMetalLogger.logger.info("File successfully deleted.");
        } else {
          JMetalLogger.logger.info("Error deleting file.");
        }
      }
    } else {
      JMetalLogger.logger.info("File " + file + " does NOT exist.");
    }
  }
891805
public void removeFile(final FileWidgetUpload file) {
		List<FileWidgetUpload> files = (List<FileWidgetUpload>) getData();
		if (files != null) {
			files.remove(file);
			if (files.isEmpty()) {
				setData(null);
			}
		}
	}
857510
public static final void deleteQuietly(File file)
   {
      if (file != null)
      {
         if (file.isDirectory())
         {
            File[] children = file.listFiles();
            if (children != null)
            {
               for (File child : children)
               {
                  deleteQuietly(child);
               }
            }
         }
         file.delete();
      }
   }
178443
public static void deleteFileOrDirectory(File file) {
    if (!file.isDirectory()) {
      file.delete();
      return;
    }

    if (file.list().length == 0) { //Nothing under directory. Just delete it.
      file.delete();
      return;
    }

    for (String temp : file.list()) { //Delete files or directory under current directory.
      File fileDelete = new File(file, temp);
      deleteFileOrDirectory(fileDelete);
    }
    //Now there is nothing under directory, delete it.
    deleteFileOrDirectory(file);
  }
1180744
function remove(filepath, options) {
		if (grunt.file.exists(filepath) && grunt.file.delete(filepath, options)) {
			grunt.log.write((options['no-write'] ? 'Would remove ' : 'Removed ') + filepath + ' ... ');
			grunt.log.ok();
			return true;
		}
		return false;
	}
1344158
function remove(file, options, done) {
    if (arguments.length === 2 && 'function' === typeof options) {
        done = options;
        options = {};
    }

    if ('function' !== typeof done) {
        done = function() {};
    }

    function callfile(file, stats, done) {
        fs.unlink(file, done);
    }

    function calldir(dir, stats, files, state, done) {
        if (state === 'end') {
            if (options.empty && dir === file) {
                done();
            } else {
                if (stats.isSymbolicLink()) {
                    fs.unlink(dir, done);
                } else {
                    fs.rmdir(dir, function(er) {
                        if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
                            // try in few time, last deletion is not completely ended
                            setTimeout(function() {
                                fs.rmdir(dir, done);
                            }, 10);
                        } else {
                            done(er);
                        }
                    });
                }
            }
        } else {
            done();
        }
    }

    options = Object.assign({
        fs: fs,
        resolve: true,
        followSymlink: false
    }, options);

    _explore(file, callfile, calldir, options, done);
}
459351
public static void deleteFile(@Nullable File file) throws IOException {
		Validate.isTrue(isFileExists(file), "%s is not exist or not a file", file);
		deleteFile(file.toPath());
	}
1084917
function (file) {


        // 模板字符串
        var source = '';

        var readError = null;
        var compileError = null;
        var writeError = null;

        // 目标路径
        var target = file
        .replace(path.extname(file), '.js')
        .replace(this.base, this.output);

        var mod = this._getCache(file);
        var modObject = {};
        var metadata = {};
        var count = 0;

        var isDebug = this.options.debug;
        var isCacheDir = this.options.combo;


        try {
            source = fs.readFileSync(file, this.options.charset);
        } catch (e) {
            readError = e;
        }


        var newMd5 = this._getMd5(source + JSON.stringify(this['gcomp-config.json']));

        // 如果开启了合并，编译后的文件使用缓存目录保存
        if (isCacheDir) {
            target = target.replace(this.output, path.join(this.output, CACHE_DIR));
        }


        // 尝试从文件中读取上一次编译的结果
        if (!mod && fs.existsSync(target)) {
            mod = this._fsRead(target, this.options.charset);
        }


        // 获取缓存的元数据
        if (mod) {
            metadata = this._getMetadata(mod) || {};
            count = metadata.version || 0;
        }


        // 检查是否需要编译
        var modified = !this.options.cache
        || !mod                         // 从来没有编译过
        || metadata.debug               // 上个版本为调试版
        || isDebug                      // 当前配置为调试版
        || newMd5 !== metadata.md5;     // 模板已经发生了修改（包括配置文件）


        // 获取模板 ID
        var id = this._toId(file);


        // 广播：模板加载事件
        this.emit('load', readError, {

            // 模板 ID
            id: id,

            // 模板是否需要重新编译
            modified: modified,

            // 原始文件路径
            sourceFile: file,

            // 模板源代码
            source: source,

            // 输出路径
            outputFile: target

        });


        if (readError) {
            return;
        }


        try {

            // 编译模板
            if (modified) {
                modObject = this.template.AOTcompile(source, {
                    filename: id,
                    alias: this.options.alias,
                    type: this.options.type,
                    compress: this.options.compress,
                    escape: this.options.escape,
                    runtime: this.options.runtime,
                    debug: isDebug
                });
                mod = modObject.code;
            }

        } catch (e) {
           compileError = e;
        }


        // 不输出的情况：遇到错误 || 文件或配置没有更新
        if (!compileError && modified) {

            count ++;

            mod = this._setMetadata(mod, {
                debug: isDebug,
                version: count,
                md5: newMd5
            });

            if (this.options.output !== false) {
                try {
                    this._fsMkdir(path.dirname(target));//////
                    fs.writeFileSync(target, mod, this.options.charset);
                } catch (e) {
                    writeError = e;
                }


                if (!isCacheDir && !writeError) {
                    if (isDebug) {
                        this._beautify(target);
                    }

                    if (!isDebug && this.options.minify) {
                        this._minify(target);
                    }
                }
            }

        }


        var compileInfo = {

            // 模板 ID
            id: id,

            // 版本
            version: count,

            // 源码
            source: source,

            // 模板文件路径
            sourceFile: file,

            // 编译结果代码
            output: mod,

            // 编译输出文件路径
            outputFile: target,

            // 是否被修改
            modified: modified,

            // 依赖的子模板 ID 列表
            requires: modObject.requires || []
        };


        if (compileError && !compileError.source) {

            // 语法错误，目前只能对比生成后的 js 来查找错误的模板语法

            compileError.debugFile = path.join(this.base, DEBUG_File);

            this.debuging = true;

            this._debug(compileError, function (message) {

                var e = {

                    // 错误名称
                    name: compileError.name,

                    // 报错信息
                    message: message,

                    // 调试文件地址
                    debugFile: compileError.debugFile,

                    // 编译器输出的临时文件
                    temp: compileError.temp

                };

                for (var name in e) {
                    compileError[name] = e[name];
                }

                this.emit('debug', compileError);

            }.bind(this));


        } else {

            // 删除上次遗留的调试文件
            if (this.debuging) {
                this._fsUnlink(path.join(this.base, DEBUG_File));
                delete this.debuging;
            }

            // 缓存编译好的模板
            this._setCache(file, mod);
        }


        this.emit('compile', compileError || writeError, compileInfo);


        if (compileError || writeError) {
            this.emit('debug', compileError || writeError);
            return null;
        } else {
            return compileInfo;
        }
    }
269363
function addFile(file) {
            var $li = $('<li id="' + file.id + '">' +
                '<p class="title">' + file.name + '</p>' +
                '<p class="imgWrap"></p>' +
                '<p class="progress"><span></span></p>' +
                '</li>'),

                $btns = $('<div class="file-panel">' +
                    '<span class="cancel">删除</span>' + '</div>').appendTo($li),
                $prgress = $li.find('p.progress span'),
                $wrap = $li.find('p.imgWrap'),
                $info = $('<p class="error"></p>'),

                showError = function(code) {
                    switch (code) {
                        case 'interrupt':
                            text = '上传暂停';
                            break;

                        default:
                            text = '上传失败，请重试';
                            break;
                    }

                    $info.text(text).appendTo($li);
                };

            if (file.getStatus() === 'invalid') {
                showError(file.statusText);
            } else {
                $wrap.text('不能预览');
                percentages[file.id] = [file.size, 0];
                file.rotation = 0;
            }

            file.on('statuschange', function(cur, prev) {
                if (prev === 'progress') {
                    $prgress.hide().width(0);
                } else if (prev === 'queued') {
                    $li.off('mouseenter mouseleave');
                    $btns.remove();
                }

                // 成功
                if (cur === 'error' || cur === 'invalid') {
                    showError(file.statusText);
                    percentages[file.id][1] = 1;
                } else if (cur === 'interrupt') {
                    showError('interrupt');
                } else if (cur === 'queued') {
                    percentages[file.id][1] = 0;
                } else if (cur === 'progress') {
                    $info.remove();
                    $prgress.css({
                        display: 'block',
                        width: '10%'
                    });
                } else if (cur === 'complete') {
                    $li.append('<span class="success"></span>');
                }

                $li.removeClass('state-' + prev).addClass('state-' + cur);
            });

            $li.on('mouseenter', function() {
                $btns.stop().animate({
                    height: 30
                });
            });

            $li.on('mouseleave', function() {
                $btns.stop().animate({
                    height: 0
                });
            });

            $btns.on('click', 'span', function() {
                uploader.removeFile(file);
            });

            $li.appendTo($queue);
        }
960114
function (file) {
        if (!this.ignore(file)) {
            file = this.map(file);
            file = utils.normalize(file);
            return file;
        }
    }
908378
public static void transferFile(File src, File dest) throws Exception {

        // 删除文件
        // LOGGER.info("start to remove download file: " + ""
        // + dest.getAbsolutePath());
        if (dest.exists()) {
            dest.delete();
        }

        // 转移临时下载文件至下载文件夹
        FileUtils.copyFile(src, dest);
    }
991452
function (filename, fn) {

		fn = fn || function () {};

		this._image.pack().pipe(fs.createWriteStream(filename)).once('close', function () {
			this._image.removeListener('error', fn);
			fn(undefined, this);
		}.bind(this)).once('error', function (err) {
			this._image.removeListener('close', fn);
			fn(err, this);
		}.bind(this));
	}
574239
public static void deleteFirst(@NonNull File[] files, @NonNull Comparator<File> sortedBy, int numFiles) {
    Arrays.sort(files, sortedBy);
    int size = Math.min(files.length, numFiles);
    for (int i = 0; i < size; i++) {
      if (!files[i].delete()) {
        Log.w(LOG_TAG, "Failed to delete file: " + files[i]);
      }
    }
  }
290896
def remove_links_from_file(file)
      urls = File.foreach(file).map { |url| url.chomp unless url.empty? }
      remove_links(urls)
    end
388118
function removeExtension(file) {
  let parts = path.parse(file);
  delete parts.ext;
  delete parts.base;
  return path.format(parts);
}
174884
private void delete(File file) {

		// Assertions.
		if (file == null) {
			String msg = "Argument 'file' cannot be null.";
			throw new IllegalArgumentException(msg);
		}

		if (file.isDirectory()) {
			for (File f : file.listFiles()) {
				delete(f);
			}
		}

		file.delete();

	}