DIV CSS 佈局教程網

Node.js 中 fs.unlinkSync 方法詳解與使用教學
編輯:關於JavaScript     

方法說明

unlink() 的同步版本,用來刪除檔案。

語法

fs.unlinkSync(path)

此方式屬於 fs 模組,使用前必須先引入:var fs = require("fs")

參數說明

path:檔案路徑。

範例

var fs = require('fs');
var filepath = '126.txt';
fs.unlinkSync(filepath);

原始碼

fs.unlinkSync = function(path) {
  nullCheck(path);
  return binding.unlink(pathModule._makeLong(path));
};
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved