var path = require('path'); var filepath = '/tmp/demo/js/test.js'; // 輸出:/tmp/demo/js console.log( path.dirname(filepath) ); var myPath ...
確定! 回上一頁