[TIMOB-27322] TiAPI: Add more support for symbolic/hard links to Filesystem API
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.2.0 |
Fix Version/s | n/a |
Components | Android, iOS, TiAPI |
Labels | engSchedule |
Reporter | Christopher Williams |
Assignee | Abir Mukherjee |
Created | 2019-08-08T17:07:04.000+0000 |
Updated | 2020-11-23T18:04:29.000+0000 |
Description
Currently the only hint of support for links (hard or symbolic) is the
symbolicLink
property on Ti.Filesystem.File
. But looking at the Android source code, I believe this will always return false (we don't appear to actually ever change the internal boolean flag or query for this info).
iOS will return the correct value, but offers no support for creating symbolic/hard links, nor for "reading" them to see their destination.
On iOS there are APIs for creating symbolic and hard links and reading them: - [createsymboliclinkatpath](https://developer.apple.com/documentation/foundation/nsfilemanager/1411007-createsymboliclinkatpath?language=objc) - [linkitematpath](https://developer.apple.com/documentation/foundation/nsfilemanager/1411206-linkitematpath?language=objc) - [destinationofsymboliclinkatpath](https://developer.apple.com/documentation/foundation/nsfilemanager/1415161-destinationofsymboliclinkatpath?language=objc) Android has the java-equivalent java.nio.file APIs which are "link-aware", but they were not added until API level 26: https://developer.android.com/reference/java/nio/file/Files.html