Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27322] TiAPI: Add more support for symbolic/hard links to Filesystem API

GitHub Issuen/a
TypeBug
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.2.0
Fix Version/sn/a
ComponentsAndroid, iOS, TiAPI
LabelsengSchedule
ReporterChristopher Williams
AssigneeAbir Mukherjee
Created2019-08-08T17:07:04.000+0000
Updated2020-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.

Comments

  1. Christopher Williams 2019-08-08

    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

JSON Source