node-webkit数据库文件存储在哪里? [英] Where are node-webkit database files stored?
问题描述
我刚刚开始使用Node-webkit,并认为它很棒.
I've just started to work with Node-webkit, and think it's great.
I've setup a db using the "Web SQL Database" option, mentioned here, and it seems to work well. Much like Sqlite, which I'm a bit familiar with.
在文档中,这是使用sqlite实现的,因此我希望能够找到在磁盘上创建的实际db文件,并使用sqliteman之类的Sqlite编辑器对其进行查看.
From the docs, this is implemented using sqlite, so I'd like to be able to find the actual db file this create on disk and look at it with a Sqlite editor, like sqliteman.
数据库文件保存在哪里?
我无法在文档中找到它,也无法通过谷歌搜索;-)
I couldn't find it in the docs, or by googling it ;-)
推荐答案
由于节点Webkit版本为0.6.1,因此可以从App对象检索dataPath. WebSQL文件将存储在databases
文件夹中.
Since node-webkit version 0.6.1, you may retrieve the dataPath from the App object. The WebSQL files will be stored within the databases
folder.
Wiki : https://github.com/rogerwang/node-webkit/Wiki/App
获取用户目录中应用程序的数据路径.
Windows:%LOCALAPPDATA%/;
Linux:〜/.config/;
OSX:〜/Library/Application Support/清单中的字段在哪里.
Get the application's data path in user's directory.
Windows: %LOCALAPPDATA%/;
Linux: ~/.config/;
OSX: ~/Library/Application Support/ where is the field in the manifest.
示例:
require('nw.gui').App.dataPath;
这篇关于node-webkit数据库文件存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!