Hello. Can anyone refer me to some phonegap documentation that explains how to express a full path to a file.
For example, I use this:
fs.root.getFile('docj.txt', {create: true}, function(fileEntry) {
to create a file named docj.txt. This works fine since I can write, read and delete this file by just specifying the name 'docj.txt'.
Also, I found the full path with this command:
alert(fs.root.fullPath) which was just a forward slash "/".
However, when I specify the same file as an email attachment like this:
cordova.plugins.email.open({
app: 'gmail',
to: '
geo...@cyberwurks.com',
subject: 'Database',
body: 'Database Attached',
//['file:///data/docj.txt']});
attachments:'docj.txt'}); or attachments:'/docj.txt'}); don't work. The email system says "cannot attach emplty file".
Any help will be appreciated. Thanks.
I assume that the attachment statement needs the full path and file name. However, I have no idea how to express the full path. Hence I am looking for some docs that explain it.