capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

Improve docs on Filesystem and Storage apis

Open mrodal opened this issue 6 years ago • 3 comments
trafficstars

Some improvements:

  • Explain how Storage is handled in non web platforms. What does it use instead of localstorage
  • Explain how Filesystem is handled in different platforms (I found out by trial that Filesystem on web it uses indexeddb)
  • In the Filesystem docs it mentions cloud backed locations, but it doesnt mention how to use them. Is it one of the FilesystemDirectory directories?
  • In the Filesystem docs, mention how to handle binary files. (this is working for me: https://github.com/ionic-team/capacitor/issues/31#issuecomment-492779894)

Thanks, and great work, Im really liking capacitor 🙂

mrodal avatar May 30 '19 19:05 mrodal

Also I was curious if there is any advantage to using the Capacitor Storage vs the Ionic Storage in an Ionic app.

kevinclarkadstech avatar Nov 18 '19 21:11 kevinclarkadstech

Having the same question as @kevinclarkadstech regarding the difference between the two

sabahang avatar Jan 27 '20 10:01 sabahang

I decided not to use Ionic Storage because there are dependencies on Angular, although no reason there should be.

In the code there is

import { InjectionToken } from '@angular/core';

/** @hidden */
export const StorageConfigToken = new InjectionToken<any>(
  'STORAGE_CONFIG_TOKEN'
);

StorageConfigToken is created as an Angular InjectionToken but never used.

With that being said I am just using LocalForage, which is what @ionic/storage uses internally.

I haven't looked at Capacitor Storage in depth to see what it is using.

kevinclarkadstech avatar Jan 28 '20 16:01 kevinclarkadstech