Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
-
2022wk52FOQtforAndroid
Description
Currently, QFileInfo::birthTime() returns null, probably because the Android File API does not expose the information: https://developer.android.com/reference/java/io/File.html
However, as of API Level 26, it is possible to retrieve it as a BasicFileAttribute (source: https://stackoverflow.com/a/48431255/1144539 ):
File file = ...;
BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
long createdAt = attr.creationTime().toMillis();