Html PERSISTENT 文件系统存储在哪里使用 chrome 存储?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11676584/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where does PERSISTENT file system storage store with chrome?
提问by George Mauer
When doing webkitRequestFileSystem
in window.PERSISTENT
optionin Google Chrome, where on my filesystem do files get written? I'd like to drop files there and have Chrome interact with them while I'm building and debugging this app.
webkitRequestFileSystem
window.PERSISTENT
在 Google Chrome 中执行in选项时,文件在我的文件系统上的哪个位置写入?我想将文件放在那里,并在我构建和调试此应用程序时让 Chrome 与它们交互。
采纳答案by ebidel
For me, at least on Mac OSX, they're stored under /Users/USERNAME/Library/Application Support/Google/Chrome/Default/File System
for me. If you're using profiles, there will be profile directories instead of Default
. However, each origin's saved files/folders are obfuscated under directories that won't be easy for you to interact with.
对我来说,至少在 Mac OSX 上,它们是/Users/USERNAME/Library/Application Support/Google/Chrome/Default/File System
为我存储的。如果您使用配置文件,则会有配置文件目录而不是Default
. 但是,每个源的保存文件/文件夹都在您不容易与之交互的目录下进行了混淆。
For debugging the Filesystem API, you have a few options:
要调试文件系统 API,您有几个选择:
- Use this extensionto view/remove files.
- See the tips here: http://updates.html5rocks.com/2011/08/Debugging-the-Filesystem-APIThat includes viewing stored files very easily using the
filesystem:
URLs. - Drop the Filesystem Playground demo (http://html5-demos.appspot.com/static/filesystem/filer.js/demos/index.html) into your origin. You can use that to view/rename/delete files/folders easily.
- Chrome DevTools now has support for the Filesystem API for viewing the files stored under an origin. To use that, you will need to enable the Developer Tools experiments in
about:flags
, restart, hit the gear in the devtools (lower right corner), and enable the 'FileSystem inspection' under the experimental tab.
- 使用此扩展程序查看/删除文件。
- 请参阅此处的提示:http: //updates.html5rocks.com/2011/08/Debugging-the-Filesystem-API这包括使用
filesystem:
URL非常轻松地查看存储的文件。 - 将 Filesystem Playground 演示 ( http://html5-demos.appspot.com/static/filesystem/filer.js/demos/index.html) 放到您的源中。您可以使用它轻松查看/重命名/删除文件/文件夹。
- Chrome DevTools 现在支持 Filesystem API,用于查看存储在源下的文件。要使用它,您需要在 中启用 Developer Tools 实验
about:flags
,重新启动,点击 devtools 中的齿轮(右下角),并在实验选项卡下启用“文件系统检查”。
回答by Konstantin Smolyanin
On Windows XP, it is here: c:\Documents and Settings\USERNAME\Local Settings\Application Data\Google\Chrome\User Data\Default\File System\
.
在 Windows XP 上,它位于:c:\Documents and Settings\USERNAME\Local Settings\Application Data\Google\Chrome\User Data\Default\File System\
.
On Windows 7, the location is C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default\File System
.
在 Windows 7 上,位置是C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default\File System
。
It's not very useful to browse it because file and dir names are obfuscated (but content in files is unchanged).
浏览它不是很有用,因为文件和目录名称被混淆了(但文件中的内容没有改变)。
As ebidel wrote the best way is using browser of filesystem:
urls that incorporated into Chrome. It's excellent! You can get the url using fs.root.toURL()
where fs
is a FileSystem object that you get, for example, from window.webkitRequestFileSystem()
.
正如 ebidel 所写,最好的方法是使用filesystem:
包含在 Chrome 中的URL 浏览器。太棒了!您可以使用fs.root.toURL()
where fs
is a FileSystem 对象获取 url ,例如,从window.webkitRequestFileSystem()
.
回答by Iain
Just for completeness: on linux it goes into ~/.config/google-chrome/Default/File\ System/
只是为了完整性:在 linux 上它进入 ~/.config/google-chrome/Default/File\ System/
回答by George Mauer
Seems like the filesystem storage is encoded to prevent exactly what was trying to do. I ended up writing a very simple file manager available here. Start up any web server (I like mongoosefor its 0 setup) and go to the /filemanager.html route
似乎对文件系统存储进行了编码,以防止准确地进行尝试。我最终编写了一个非常简单的文件管理器。启动任何 Web 服务器(我喜欢mongoose的 0 设置)并转到/filemanager.html route
回答by yeahdixon
I saved a file called log.txt on MAC
我在 MAC 上保存了一个名为 log.txt 的文件
It ended up at ~/Library/Application\Support/Google/Chrome/Default/Storage/ext/panbljeniblfmcakpphmjmmnpcaibipi/def/File\ System/iso/p/00/
它最终位于 ~/Library/Application\Support/Google/Chrome/Default/Storage/ext/panbljeniblfmcakpphmjmmnpcaibipi/def/File\ System/iso/p/00/
with file name 00000 and no ext
文件名为 00000 且无扩展名
回答by Chibu Jax
If you are using MAC OX, and you have more than one profile on your chrome, or you cannot find default in the path, replace default
with profile
. But depending on number of profiles you have, it could be profile 1
, profile 2
, etc
如果您使用的是 MAC OX,并且您的 chrome 上有多个配置文件,或者您在路径中找不到默认值,请替换default
为profile
. 但是取决于你的配置文件的数量,也可能是profile 1
,profile 2
等