how do i get file metadata in ionic2 ?
I don’t think you can access the filesystem directly from the WebView, you may want to use a plugin such as https://github.com/apache/cordova-plugin-file
I know about it and the sample can be used effectively used when using angularjs 1.X
with typescript and ionic 2 you do not have $window or window.resolve…
Try with the node library fs.stats, … haven’t do it myself but you could give it a try
I would be extremely surprised if that worked without a plugin.
right now, there is no way with the file plugin to get file’s creation date, etc …, that is bad, fs.stats didn’t work for my when I tried, but who knows, maybe works for him… if it does, I will be extremely curious about how it did as well…
Even this plugin, which tries to provide a node-like API, only tells you whether something is a file or a directory. This plugin seems to provide size and modification time for Android, but only “is this backed up to the cloud?” for iOS. Either way, there is no actual Node running in an Ionic app, so even if you are consuming the information via the node fs API, there is going to have to be some plugin providing it, I believe.