ãã¡ã¤ã«ãåé¤ããã«ã¯ã次ã®é¢æ°ã使ç¨ãã¾ãã fs.unlinkSync(path) fs.unlink(path, callback) fs.unlinkSync(path) fs.unlinkSync(path)ã¯ãå¼æ°pathã«åé¤ãããã¡ã¤ã«ã®ãã¹ãåãã¾ãã æå®ãããpathã®ãã¡ã¤ã«ãåå¨ããªãå ´åãä¾å¤ãæãã¾ãã const fs = require('fs'); try { fs.unlinkSync('path/file.txt'); console.log('åé¤ãã¾ããã'); } catch (error) { throw error; } fs.unlink(path, callback) fs.unlink(path, callback)ã¯ãå¼æ°pathã«åé¤ãããã¡ã¤ã«ã®ãã¹ãåãã¾ãã é¢æ°callbackã¯ããã¡ã¤ã«ãåå¨ããªãå ´åã«å¼æ°errã¯ã¨ã©
{{#tags}}- {{label}}
{{/tags}}