Where does PERSISTENT file system storage store with chrome?
Asked Answered
H

6

49

When doing webkitRequestFileSystem in window.PERSISTENT option in 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.

Hemi answered 26/7, 2012 at 19:24 Comment(0)
C
45

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.

For debugging the Filesystem API, you have a few options:

  1. Use this extension to view/remove files.
  2. See the tips here: http://updates.html5rocks.com/2011/08/Debugging-the-Filesystem-API That includes viewing stored files very easily using the filesystem: URLs.
  3. 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.
  4. 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.
Camorra answered 26/7, 2012 at 19:59 Comment(7)
Does the extension work with the webkit fileSystem? I am using it and it doesn't. It only works for me when using localStorage.Timothee
Currently (at the moment I'm writing this) that extension doesn't work with chrome extensions but with sites only.Omer
I use persistent file system just before recording audio. But my cordova app works fine in ios 6 & 7 versions but fails in ios8.Stocktonontees
@ebidel, "FileSystem inspection" where? Seems to be gone.Emeldaemelen
Yea, looks like they removed the experiment from DevToolsCamorra
@ebidel, Link chrome.google.com/webstore/detail/… down too.Emeldaemelen
I ended up using filesystem:http://localhost/persistent/file_name123 to display the file but it's completely useless for huge files.Emeldaemelen
T
20

Just for completeness: on linux it goes into ~/.config/google-chrome/Default/File\ System/

Territerrible answered 13/3, 2013 at 3:32 Comment(0)
O
18

On Windows XP, it is here: 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.

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().

Omer answered 1/3, 2013 at 20:10 Comment(1)
If you get the URL via fs.root.toURL(), then you can also open it in the browser to explore your files. I tried it with a temporary storage url (filesystem:http://localhost:63342/temporary/) and it worked just fine in Chrome 65.Unkempt
H
6

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 mongoose for its 0 setup) and go to the /filemanager.html route

Hemi answered 13/2, 2013 at 16:56 Comment(0)
J
2

I saved a file called log.txt on MAC

It ended up at ~/Library/Application\Support/Google/Chrome/Default/Storage/ext/panbljeniblfmcakpphmjmmnpcaibipi/def/File\ System/iso/p/00/

with file name 00000 and no ext

Jenkins answered 19/9, 2013 at 21:15 Comment(0)
D
0

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

Domiciliate answered 14/9, 2019 at 8:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.