第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

node-webkit 如何獲取當(dāng)前路徑?

node-webkit 如何獲取當(dāng)前路徑?

梵蒂岡之花 2018-06-27 14:14:40
當(dāng)node-webkit的應(yīng)用運(yùn)行時(shí),會(huì)在臨時(shí)目錄里邊產(chǎn)生一些臨時(shí)文件,node-webkit就是在這個(gè)臨時(shí)目錄里邊運(yùn)行的,那么如何獲取程序的真實(shí)路徑?
查看完整描述

1 回答

?
明月笑刀無(wú)情

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超4個(gè)贊

I want to build some data on the current directory ? But how to get the current directory?
console.log(__dirname)
I try that, but it doesn't work.
I want a little help.
Some temp files were built in the temp directory when it work on. How to get the real dirname?

answer:

Just so you know your project is compressed, packed, and concatenated into the binary. So when it runs it will unpack to a temp directory in order to be accessed.

Get path of project directory (temp dir):

console.log(process.cwd());

Get path of project binary:

var path = require("path");console.log(path.dirname(process.execPath));


查看完整回答
反對(duì) 回復(fù) 2018-07-08
  • 1 回答
  • 0 關(guān)注
  • 411 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)