modules/orionode/lib/shared/tree.js
function deleteFile(req, res) {
		var rest = req.params["0"];
		var file = fileUtil.getFile(req, rest);
		fileUtil.withStatsAndETag(file.path, function(error, stats, etag) {
			var callback = function(error) {
				if (error) {
					return writeError(500, res, error);
				}
				sendStatus(204, res);
			};
			var ifMatchHeader = req.headers['if-match'];
			if (error && error.code === 'ENOENT') {
				return sendStatus(204, res);
			} else if (error) {
				writeError(500, res, error);
			} else if (ifMatchHeader && ifMatchHeader !== etag) {
				return sendStatus(412, res);
			} else if (stats.isDirectory()) {
				fileUtil.rumRuff(file.path, callback);
			} else {
				fs.unlink(file.path, callback);
			}
		});
	}
function deleteFile(req, res) {
		var rest = req.params["0"];
		var file = fileUtil.getFile(req, rest);
		fileUtil.withStatsAndETag(file.path, function(error, stats, etag) {
			var callback = function(error) {
				if (error) {
					return writeError(500, res, error);
				}
				sendStatus(204, res);
			};
			var ifMatchHeader = req.headers['if-match'];
			if (error && error.code === 'ENOENT') {
				return sendStatus(204, res);
			} else if (error) {
				writeError(500, res, error);
			} else if (ifMatchHeader && ifMatchHeader !== etag) {
				return sendStatus(412, res);
			} else if (stats.isDirectory()) {
				fileUtil.rumRuff(file.path, callback);
			} else {
				fs.unlink(file.path, callback);
			}
		});
	}
function deleteFile ( req , res ) { var rest = req . params [ "0" ] ; var file = fileUtil . getFile ( req , rest ) ; fileUtil . withStatsAndETag ( file . path , function ( error , stats , etag ) { var callback = function ( error ) { if ( error ) { return writeError ( 500 , res , error ) ; } sendStatus ( 204 , res ) ; } ; var ifMatchHeader = req . headers [ 'if-match' ] ; if ( error && error . code === 'ENOENT' ) { return sendStatus ( 204 , res ) ; } else if ( error ) { writeError ( 500 , res , error ) ; } else if ( ifMatchHeader && ifMatchHeader !== etag ) { return sendStatus ( 412 , res ) ; } else if ( stats . isDirectory ( ) ) { fileUtil . rumRuff ( file . path , callback ) ; } else { fs . unlink ( file . path , callback ) ; } } ) ; }
For file delete.
For file delete .