[TIMOB-7851] Android: Database - Expose a method for accessing the path of where the database file is stored.
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | n/a |
| Reporter | Michael Pettiford |
| Assignee | Unknown |
| Created | 2012-02-29T13:29:39.000+0000 |
| Updated | 2018-03-06T18:58:00.000+0000 |
Description
If possible, expose a method similar to iOS that allows a user to get the path of where the database file is being stored.
For example on iOS if I use the following code
var d = Ti.Database.open('testdb.db');
var f = d.file;
alert(f.path);
I will get the path to where the db file has been stored on the filesystem.
In TiDatabaseProxy.java:
@Kroll.getProperty @Kroll.method public TiFileProxy getFile() { return new TiFileProxy(TiFileFactory.createTitaniumFile(db.getPath(), false)); }