capacitor-plugins
capacitor-plugins copied to clipboard
Improve docs on Filesystem and Storage apis
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 🙂
Also I was curious if there is any advantage to using the Capacitor Storage vs the Ionic Storage in an Ionic app.
Having the same question as @kevinclarkadstech regarding the difference between the two
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.