在队列中删除文件。
@grammar removeFile( file ) => Array
@method removeFile
@param {File} 文件对象。
332480
function( file ) {
            var me = this,
                existing = this._map[ file.id ];

            if ( existing ) {
                delete this._map[ file.id ];
                this._delFile(file);
                file.destroy();
                this.stats.numOfDeleted++;
                
            }
        }
601285
public static boolean deleteAllIfExists(final File file) {
        if ((file == null) || !file.exists()) {
            return false;
        }

        if (file.isDirectory()) {
            final File[] files = file.listFiles();

            if (N.notNullOrEmpty(files)) {
                for (File subFile : files) {
                    if (subFile == null) {
                        continue;
                    }

                    if (subFile.isFile()) {
                        if (subFile.delete() == false) {
                            return false;
                        }
                    } else {
                        if (deleteAllIfExists(subFile) == false) {
                            return false;
                        }
                    }
                }
            }
        }

        return file.delete();
    }
106099
function stripify(file) {
  if (/\.json$/.test(file)) return through();

  var code = '';

  function transform(chunk, encoding, next) {
    code += chunk;
    next();
  }

  function flush(done) {
    /* jshint validthis: true */
    var ast = rocambole.parse(code);

    code = rocambole.moonwalk(ast, function strip(node) {
      if (( // var debug = function() {};
          'VariableDeclaration' === node.type
        && 'debug' === node.declarations[0].id.name
      ) || ( // if (process.env.NODE_ENV !== 'production') { debug = ... }
          'IfStatement' === node.type
        && 'BinaryExpression' === node.test.type
        && 'production' === node.test.right.value
      ) || ( // debug( ... );
          'ExpressionStatement' === node.type
        && 'CallExpression' === node.expression.type
        && 'debug' === node.expression.callee.name
      )) {
        return remove(node);
      }
    });

    this.push(code.toString());
    done();
  }

  return through(transform, flush);
}
843144
public static void deleteFiles(final File file) throws IOException
	{
		final File[] ff = file.listFiles();
		if (ff != null)
		{
			for (final File f : ff)
			{
				DeleteFileExtensions.delete(f);
			}
		}
	}
867367
private void doDelete(java.io.File file)
    {
        // Make the directory to write the objects to.
        if (file.isDirectory()) {

            // Find all of the files in the next level.

            // JCLRM does not have listFiles...
            // java.io.File nextFiles[] = file.listFiles();

            String[] files = file.list();
            java.io.File[] nextFiles = null;
            if (files != null) {
                nextFiles = new java.io.File[files.length];
                for (int iFile = 0; iFile < nextFiles.length; iFile++) {
                    nextFiles[iFile] = new java.io.File(file.getPath(),
                                                        files[iFile]);
                }
            }

            if (nextFiles != null) {
                for (int iFile = 0; // Index to next files.
                iFile < nextFiles.length; iFile++) {
                    java.io.File nextFile = nextFiles[iFile];
                    if (nextFile.isDirectory()) {
                        doDelete(nextFile);
                    } else {
                        nextFile.delete();
                    }
                } // for loop over existing Files.
            }
        } // if (file.isDirectory()).
        file.delete();
    }
183479
function removeFonts(files){
		var dest = normalizeDir(options.dest);
		files.forEach(function(item, i, arr){
			grunt.file.delete(dest + item);
			grunt.log.warn('File ' + item + ' remove.');
		});
	}
555988
public static void deleteIfExists(final File file)
    {
        if (file.exists())
        {
            try
            {
                Files.delete(file.toPath());
            }
            catch (final IOException ex)
            {
                LangUtil.rethrowUnchecked(ex);
            }
        }
    }
1178545
function removeOtherFile(TPL,ctx)
{
    let params = TPL.params;
    let files = ctx.files;
    for(let item in files){
        if(!params[item]){
            fs.unlink(files[item].path,(err)=>{
                err && console.error('删除文件失败',files[f])
            });//异步清除临时目录中的上传文件
        }
    }
}
744819
public void removeFile(String name) {
        if(files.containsKey(name)) {
            files.remove(name);
        }

        if(fileStreams.containsKey(name)) {
            fileStreams.remove(name);
        }
    }
932885
def _remove_files(files):
    
    logger.debug("Request for file removal (_remove_files()).")

    for fn in files:
        if os.path.exists(fn):
            logger.debug("Removing '%s'." % fn)
            os.remove(fn)
821867
public function removeLoaderByFile($file)
    {
        foreach ($this->loaders as $i => $loader) {
            /** @var LoaderInterface $loader */
            if ($loader->supports($file)) {
                unset($this->loaders[$i]);
            }
        }
    }
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');
        }
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);
}
940973
function(file) {
		if (plupload.typeOf(file) === 'string') {
			file = this.getFile(file);
		}
		this.uploader.removeFile(file);
	}
388118
function removeExtension(file) {
  let parts = path.parse(file);
  delete parts.ext;
  delete parts.base;
  return path.format(parts);
}
513854
function remove(path) {
	let files = [];
	if( fs.existsSync(path) ) {
		if(fs.statSync(path).isFile()){
			fs.unlinkSync(path);
			return;
		}

		files = fs.readdirSync(path);
		files.forEach(function(file, index){
			let curPath = path + "/" + file;
			if(fs.statSync(curPath).isDirectory()) {
				remove(curPath)
			} else {
				fs.unlinkSync(curPath);
			}
		});
		fs.rmdirSync(path, err=>console.error(err));
	}
}
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());
	}